summaryrefslogtreecommitdiff
path: root/tpool
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2021-09-14 16:23:23 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2021-09-14 16:23:23 +0300
commit03e4cb2484cc302bef2886dd3d76b3acdf7f5c23 (patch)
treeb47b07bcc986836f9a0324d593623b3a24d273ce /tpool
parentf6717c4af66c9a295c789dc30091cac6dc719350 (diff)
downloadmariadb-git-03e4cb2484cc302bef2886dd3d76b3acdf7f5c23.tar.gz
MDEV-24512 fixup: Remove after_task_callbackst-10.6-marko2
In commit ff5d306e296350e7489dd3decb01bad18d135411 we removed dbug_after_task_callback but forgot to revert the rest of commit bada05a88369051ee60623b006929dd728f704e8.
Diffstat (limited to 'tpool')
-rw-r--r--tpool/task.cc18
-rw-r--r--tpool/task_group.cc1
-rw-r--r--tpool/tpool.h14
-rw-r--r--tpool/tpool_generic.cc3
-rw-r--r--tpool/tpool_win.cc3
5 files changed, 4 insertions, 35 deletions
diff --git a/tpool/task.cc b/tpool/task.cc
index 0b5253bc725..81ec88590ce 100644
--- a/tpool/task.cc
+++ b/tpool/task.cc
@@ -1,4 +1,4 @@
-/* Copyright (C) 2019, 2020, MariaDB Corporation.
+/* Copyright (C) 2019, 2021, MariaDB Corporation.
This program is free software; you can redistribute itand /or modify
it under the terms of the GNU General Public License as published by
@@ -21,21 +21,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 - 1301 USA*/
namespace tpool
{
-
-#ifndef DBUG_OFF
-static callback_func_np after_task_callback;
-void set_after_task_callback(callback_func_np cb)
-{
- after_task_callback= cb;
-}
-
-void execute_after_task_callback()
-{
- if (after_task_callback)
- after_task_callback();
-}
-#endif
-
task::task(callback_func func, void* arg, task_group* group) :
m_func(func), m_arg(arg), m_group(group) {}
@@ -50,7 +35,6 @@ void execute_after_task_callback()
{
/* Execute directly. */
m_func(m_arg);
- dbug_execute_after_task_callback();
release();
}
}
diff --git a/tpool/task_group.cc b/tpool/task_group.cc
index 97fbb0911c8..b52fe7c0f67 100644
--- a/tpool/task_group.cc
+++ b/tpool/task_group.cc
@@ -53,7 +53,6 @@ namespace tpool
if (t)
{
t->m_func(t->m_arg);
- dbug_execute_after_task_callback();
t->release();
}
lk.lock();
diff --git a/tpool/tpool.h b/tpool/tpool.h
index d33c0608959..95e4205e601 100644
--- a/tpool/tpool.h
+++ b/tpool/tpool.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2019, 2020, MariaDB Corporation.
+/* Copyright (C) 2019, 2021, MariaDB Corporation.
This program is free software; you can redistribute itand /or modify
it under the terms of the GNU General Public License as published by
@@ -184,18 +184,6 @@ class thread_pool;
extern aio *create_simulated_aio(thread_pool *tp);
-#ifndef DBUG_OFF
-/*
- This function is useful for debugging to make sure all mutexes are released
- inside a task callback
-*/
-void set_after_task_callback(callback_func_np cb);
-void execute_after_task_callback();
-#define dbug_execute_after_task_callback() execute_after_task_callback()
-#else
-#define dbug_execute_after_task_callback() do{}while(0)
-#endif
-
class thread_pool
{
protected:
diff --git a/tpool/tpool_generic.cc b/tpool/tpool_generic.cc
index 0c769d67c99..ecc489c3357 100644
--- a/tpool/tpool_generic.cc
+++ b/tpool/tpool_generic.cc
@@ -1,4 +1,4 @@
-/* Copyright (C) 2019, 2020, MariaDB Corporation.
+/* Copyright (C) 2019, 2021, MariaDB Corporation.
This program is free software; you can redistribute itand /or modify
it under the terms of the GNU General Public License as published by
@@ -311,7 +311,6 @@ public:
return;
m_callback(m_data);
- dbug_execute_after_task_callback();
m_running = false;
if (m_pool && m_period)
diff --git a/tpool/tpool_win.cc b/tpool/tpool_win.cc
index 09fd49d9411..88168b26eff 100644
--- a/tpool/tpool_win.cc
+++ b/tpool/tpool_win.cc
@@ -1,4 +1,4 @@
-/* Copyright(C) 2019 MariaDB
+/* Copyright (C) 2019, 2021, MariaDB Corporation.
This program is free software; you can redistribute itand /or modify
it under the terms of the GNU General Public License as published by
@@ -93,7 +93,6 @@ class thread_pool_win : public thread_pool
return;
}
timer->m_func(timer->m_data);
- dbug_execute_after_task_callback();
if (timer->m_period)
timer->set_time(timer->m_period, timer->m_period);
}