summaryrefslogtreecommitdiff
path: root/sql/scheduler.h
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2011-07-02 22:08:51 +0200
committerSergei Golubchik <sergii@pisem.net>2011-07-02 22:08:51 +0200
commit9809f05199aeb0b67991fac41bd86f38730768dc (patch)
treefa2792ff86d0da014b535d743759810612338042 /sql/scheduler.h
parent0accbd0364e0333e0b119aa9ce93e34ded9df6cb (diff)
parent5a0e7394a5ae0c7b6a1ea35b7ea3a8985325987a (diff)
downloadmariadb-git-9809f05199aeb0b67991fac41bd86f38730768dc.tar.gz
5.5-merge
Diffstat (limited to 'sql/scheduler.h')
-rw-r--r--sql/scheduler.h24
1 files changed, 14 insertions, 10 deletions
diff --git a/sql/scheduler.h b/sql/scheduler.h
index cb7568b566a..247c98515ac 100644
--- a/sql/scheduler.h
+++ b/sql/scheduler.h
@@ -58,6 +58,13 @@ struct scheduler_functions
*/
enum scheduler_types
{
+ /*
+ The default of --thread-handling is the first one in the
+ thread_handling_names array, this array has to be consistent with
+ the order in this array, so to change default one has to change
+ the first entry in this enum and the first entry in the
+ thread_handling_names array.
+ */
SCHEDULER_ONE_THREAD_PER_CONNECTION=0,
SCHEDULER_NO_THREADS,
SCHEDULER_TYPES_COUNT
@@ -67,11 +74,6 @@ void one_thread_per_connection_scheduler(scheduler_functions *func,
ulong *arg_max_connections, uint *arg_connection_count);
void one_thread_scheduler(scheduler_functions *func);
-enum pool_command_op
-{
- NOT_IN_USE_OP= 0, NORMAL_OP= 1, CONNECT_OP, KILL_OP, DIE_OP
-};
-
#if defined(HAVE_LIBEVENT) && !defined(EMBEDDED_LIBRARY)
#define HAVE_POOL_OF_THREADS 1
@@ -98,11 +100,6 @@ public:
LIST list;
bool thread_attached; /* Indicates if THD is attached to the OS thread */
-# ifndef DBUG_OFF
- char dbug_explain[512];
- bool set_explain;
-# endif
-
thd_scheduler();
~thd_scheduler();
bool init(THD* parent_thd);
@@ -122,4 +119,11 @@ class thd_scheduler
#endif
+void *thd_get_scheduler_data(THD *thd);
+void thd_set_scheduler_data(THD *thd, void *data);
+PSI_thread* thd_get_psi(THD *thd);
+void thd_set_psi(THD *thd, PSI_thread *psi);
+
+extern scheduler_functions *thread_scheduler;
+
#endif