summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMikael Ronström <mikael@dator9>2011-02-10 19:24:31 +0100
committerMikael Ronström <mikael@dator9>2011-02-10 19:24:31 +0100
commit8d319b1f29537437ecf5f93003308fc16bdcd123 (patch)
tree25e1b3b6fedc808f209754fc53ea02c068036449 /include
parentaf948cd6fce0878375b363b980f7432ef41273b9 (diff)
downloadmariadb-git-8d319b1f29537437ecf5f93003308fc16bdcd123.tar.gz
Simplifications of server interface to scheduler
Diffstat (limited to 'include')
-rw-r--r--include/mysql/thread_pool_priv.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/include/mysql/thread_pool_priv.h b/include/mysql/thread_pool_priv.h
index 555d5fb0e7b..9bda377be13 100644
--- a/include/mysql/thread_pool_priv.h
+++ b/include/mysql/thread_pool_priv.h
@@ -34,11 +34,27 @@
*/
#define MYSQL_SERVER 1
#include <sql_class.h>
-#include <scheduler.h>
#include <debug_sync.h>
#include <sql_profile.h>
#include <table.h>
+struct scheduler_functions
+{
+ uint max_threads;
+ bool (*init)(void);
+ bool (*init_new_connection_thread)(void);
+ void (*add_connection)(THD *thd);
+ void (*thd_wait_begin)(THD *thd, int wait_type);
+ void (*thd_wait_end)(THD *thd);
+ void (*post_kill_notification)(THD *thd);
+ bool (*end_thread)(THD *thd, bool cache_thread);
+ void (*end)(void);
+};
+
+/* Needed to get access to scheduler variables */
+void* thd_get_scheduler(THD *thd);
+PSI_thread* thd_get_psi(THD *thd);
+
/*
The thread pool must be able to execute commands using the connection
state in THD object. This is the main objective of the thread pool to