summaryrefslogtreecommitdiff
path: root/innobase/include/os0sync.h
diff options
context:
space:
mode:
authorunknown <heikki@hundin.mysql.fi>2003-05-30 22:44:37 +0300
committerunknown <heikki@hundin.mysql.fi>2003-05-30 22:44:37 +0300
commitd9711e32b966610af3969c76f7e96f18478dffca (patch)
tree9565fc6f3fff83d440f4639b6183c6c4a59a7433 /innobase/include/os0sync.h
parentfadfa46796576b5566ee3f45920b07e2f2326552 (diff)
downloadmariadb-git-d9711e32b966610af3969c76f7e96f18478dffca.tar.gz
Many files:
Exit all threads created by innoDB at shutdown innobase/os/os0file.c: Exit all threads created by innoDB at shutdown innobase/os/os0sync.c: Exit all threads created by innoDB at shutdown innobase/os/os0thread.c: Exit all threads created by innoDB at shutdown innobase/include/os0file.h: Exit all threads created by innoDB at shutdown innobase/include/os0sync.h: Exit all threads created by innoDB at shutdown innobase/include/os0thread.h: Exit all threads created by innoDB at shutdown innobase/log/log0log.c: Exit all threads created by innoDB at shutdown innobase/srv/srv0srv.c: Exit all threads created by innoDB at shutdown innobase/srv/srv0start.c: Exit all threads created by innoDB at shutdown
Diffstat (limited to 'innobase/include/os0sync.h')
-rw-r--r--innobase/include/os0sync.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/innobase/include/os0sync.h b/innobase/include/os0sync.h
index b2d613c4619..d52444d02ec 100644
--- a/innobase/include/os0sync.h
+++ b/innobase/include/os0sync.h
@@ -38,6 +38,13 @@ typedef os_mutex_str_t* os_mutex_t;
#define OS_SYNC_TIME_EXCEEDED 1
+/* Mutex protecting the thread count */
+extern os_mutex_t os_thread_count_mutex;
+
+/* This is incremented by 1 in os_thread_create and decremented by 1 in
+os_thread_exit */
+extern ulint os_thread_count;
+
/*************************************************************
Creates an event semaphore, i.e., a semaphore which may
just have two states: signaled and nonsignaled.
@@ -85,7 +92,10 @@ os_event_free(
/*==========*/
os_event_t event); /* in: event to free */
/**************************************************************
-Waits for an event object until it is in the signaled state. */
+Waits for an event object until it is in the signaled state. If
+srv_shutdown_state == SRV_SHUTDOWN_EXIT_THREADS this also exits the
+waiting thread when the event becomes signaled (or immediately if the
+event is already in the signaled state). */
void
os_event_wait(