summaryrefslogtreecommitdiff
path: root/sql/event_scheduler.h
diff options
context:
space:
mode:
authorandrey@example.com <>2006-08-17 14:22:59 +0200
committerandrey@example.com <>2006-08-17 14:22:59 +0200
commit5d626c5c9a37af14c8e4d7f90e4832d142632502 (patch)
treef3888db9a52ec3b4680a4f1ede56911174eda337 /sql/event_scheduler.h
parent5b2608db9b1c4420db6158f36e1ad81650adfdb7 (diff)
downloadmariadb-git-5d626c5c9a37af14c8e4d7f90e4832d142632502.tar.gz
WL#3337 (Event scheduler new architecture)
Post-review fixes. Mostly whitespace, int-to-bool return value, fixed comments
Diffstat (limited to 'sql/event_scheduler.h')
-rw-r--r--sql/event_scheduler.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/sql/event_scheduler.h b/sql/event_scheduler.h
index cc6d0f7a20a..18a805eb6f6 100644
--- a/sql/event_scheduler.h
+++ b/sql/event_scheduler.h
@@ -31,12 +31,13 @@ deinit_event_thread(THD *thd);
class Event_scheduler
{
public:
- Event_scheduler(){}
+ Event_scheduler():state(UNINITIALIZED){}
~Event_scheduler(){}
enum enum_state
{
- INITIALIZED = 0,
+ UNINITIALIZED = 0,
+ INITIALIZED,
RUNNING,
STOPPING
};
@@ -50,12 +51,12 @@ public:
stop();
/*
- Need to be public because has to be called from the function
+ Need to be public because has to be called from the function
passed to pthread_create.
*/
bool
run(THD *thd);
-
+
void
init_scheduler(Event_queue *queue);
@@ -64,7 +65,7 @@ public:
void
init_mutexes();
-
+
void
deinit_mutexes();
@@ -112,7 +113,7 @@ private:
ulong thread_id;
pthread_cond_t COND_state;
-
+
Event_queue *queue;
uint mutex_last_locked_at_line;
@@ -121,7 +122,7 @@ private:
const char* mutex_last_unlocked_in_func;
bool mutex_scheduler_data_locked;
bool waiting_on_cond;
-
+
ulonglong started_events;
private: