aboutsummaryrefslogtreecommitdiff
path: root/externals/mysql/wqueue.h
diff options
context:
space:
mode:
authorBrian <runningnak3d@gmail.com>2010-06-09 00:34:46 -0600
committerBrian <runningnak3d@gmail.com>2010-06-09 00:34:46 -0600
commit0a4899646d5b65c9221727f8f49b5ab7a6f03e7a (patch)
treedb8c61906a22499e4bb984be4e63bc1135d9dab2 /externals/mysql/wqueue.h
parent02efe02b43a7ce192cb313586eb2cb9df220575e (diff)
parentfb96f2b1d88a89fdb16387b26dcefc803370d94e (diff)
* Merge
--HG-- branch : trunk
Diffstat (limited to 'externals/mysql/wqueue.h')
-rw-r--r--externals/mysql/wqueue.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/externals/mysql/wqueue.h b/externals/mysql/wqueue.h
new file mode 100644
index 00000000000..658f3d66f12
--- /dev/null
+++ b/externals/mysql/wqueue.h
@@ -0,0 +1,27 @@
+
+#ifndef _wqueue_h
+#define _wqueue_h
+
+#include <my_global.h>
+#include <my_pthread.h>
+
+/* info about requests in a waiting queue */
+typedef struct st_pagecache_wqueue
+{
+ struct st_my_thread_var *last_thread; /* circular list of waiting
+ threads */
+} WQUEUE;
+
+#ifdef THREAD
+void wqueue_link_into_queue(WQUEUE *wqueue, struct st_my_thread_var *thread);
+void wqueue_unlink_from_queue(WQUEUE *wqueue, struct st_my_thread_var *thread);
+void wqueue_add_to_queue(WQUEUE *wqueue, struct st_my_thread_var *thread);
+void wqueue_add_and_wait(WQUEUE *wqueue,
+ struct st_my_thread_var *thread,
+ pthread_mutex_t *lock);
+void wqueue_release_queue(WQUEUE *wqueue);
+void wqueue_release_one_locktype_from_queue(WQUEUE *wqueue);
+
+#endif
+
+#endif