Shared data structure to process prefetch requests
[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
8 #define ARRAY_SIZE 20
9
10 // DS that contains information to be shared between threads.
11 typedef struct prefetchthreadqueue {
12         int *buffer[ARRAY_SIZE];
13         int front;
14         int rear;
15         pthread_mutex_t qlock;
16 } prefetchthreadqueue_t;
17
18 void queueInsert(int *);
19 int *queueDelete();
20 void queueInit(); //Initializes the queue and qlock mutex 
21
22 #endif