Change Eclipse configuration
[jabaws.git] / website / archive / binaries / mac / src / fasta34 / dec_pthr_subs.h
1
2 /* $Name: fa_34_26_5 $ - $Id: dec_pthr_subs.h,v 1.1.1.1 1999/10/22 20:55:59 wrp Exp $ */
3
4 #include <pthread.h>
5
6 #define check(status,string) \
7      if (status == -1) perror(string)   /* error macro for thread calls */
8
9 #ifndef XTERNAL
10 pthread_t threads[MAX_WORKERS];
11
12 /* mutex stuff */
13
14 pthread_mutex_t reader_mutex;      /* empty buffer pointer structure lock */
15 pthread_mutex_t worker_mutex;      /* full buffer pointer structure lock */
16
17 /* condition variable stuff */
18
19 pthread_cond_t reader_cond_var;    /* condition variable for reader */
20 pthread_cond_t worker_cond_var;    /* condition variable for workers */
21
22 pthread_mutex_t start_mutex;       /* start-up synchronisation lock */
23 pthread_cond_t start_cond_var;     /* start-up synchronisation condition variable */
24
25 extern pthread_t threads[];
26
27 /* mutex stuff */
28
29 extern pthread_mutex_t reader_mutex;
30 extern pthread_mutex_t worker_mutex;
31
32 /* condition variable stuff */
33
34 extern pthread_cond_t reader_cond_var;
35 extern pthread_cond_t worker_cond_var;
36
37 extern pthread_mutex_t start_mutex;
38 extern pthread_cond_t start_cond_var;
39 extern int start_thread;
40
41 #endif