~jlukas79/+junk/mysql-server

« back to all changes in this revision

Viewing changes to include/wqueue.h

manual merge 6.0-main --> 6.0-bka-review

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
#ifndef _wqueue_h
 
3
#define _wqueue_h
 
4
 
 
5
#include <my_global.h>
 
6
#include <my_pthread.h>
 
7
 
 
8
/* info about requests in a waiting queue */
 
9
typedef struct st_pagecache_wqueue
 
10
{
 
11
  struct st_my_thread_var *last_thread;         /* circular list of waiting
 
12
                                                   threads */
 
13
} WQUEUE;
 
14
 
 
15
#ifdef THREAD
 
16
void wqueue_link_into_queue(WQUEUE *wqueue, struct st_my_thread_var *thread);
 
17
void wqueue_unlink_from_queue(WQUEUE *wqueue, struct st_my_thread_var *thread);
 
18
void wqueue_add_to_queue(WQUEUE *wqueue, struct st_my_thread_var *thread);
 
19
void wqueue_add_and_wait(WQUEUE *wqueue,
 
20
                         struct st_my_thread_var *thread,
 
21
                         pthread_mutex_t *lock);
 
22
void wqueue_release_queue(WQUEUE *wqueue);
 
23
void wqueue_release_one_locktype_from_queue(WQUEUE *wqueue);
 
24
 
 
25
#endif
 
26
 
 
27
#endif