add flag "corepin" for core pinning
[IRC.git] / Robust / src / Runtime / oooJava / trqueue.h
1 #ifndef TRQUEUE_H_
2 #define TRQUEUE_H_
3
4 //NOTE: SIZE MUST BE A POWER OF TWO;
5 //SIZE is used as mask to check overflow
6 #define TRSIZE 16384
7
8 struct trQueue {
9   void * elements[TRSIZE];
10   volatile unsigned int head;
11   char buffer[60];//buffer us to the next cache line
12   volatile unsigned int tail;
13   struct trQueue *next;
14   struct Hashtable_rcr ** allHashStructures;
15   int id;
16 };
17
18 void enqueueTR(struct trQueue *, void * ptr);
19 void * dequeueTR(struct trQueue *);
20 void createTR();
21 void returnTR();
22 #endif