add more comments
[IRC.git] / Robust / src / Runtime / DSTM / interface / queue.h
1 #ifndef _QUEUE_H_
2 #define _QUEUE_H_
3
4 #include<stdio.h>
5 #include<stdlib.h>
6 #include<pthread.h>
7 #include<string.h>
8
9 // DS that contains information to be shared between threads.
10 typedef struct prefetchqelem {
11         struct prefetchqelem *next;
12 } prefetchqelem_t;
13
14 typedef struct primarypfq {
15         prefetchqelem_t *front, *rear;
16         pthread_mutex_t qlock;
17         pthread_cond_t qcond;
18 } primarypfq_t; 
19
20
21 void queueInit(void);
22 void delqnode(); 
23 void queueDelete(void);
24 void enqueue(prefetchqelem_t *);
25 prefetchqelem_t *dequeue(void);
26 void queueDisplay();
27 void predealloc(prefetchqelem_t *);
28 #endif