Mercurial > cgi-bin > hgwebdir.cgi > VMS > C_Libraries > Queue_impl
comparison PrivateQueue.h @ 41:8fcbe46de60a
bugfixes - peek and enlarge now working properly
| author | Nina Engelhardt <nengel@mailbox.tu-berlin.de> |
|---|---|
| date | Wed, 19 Dec 2012 15:38:08 +0100 |
| parents | cb29e773f76f |
| children | 179144f26c9d |
comparison
equal
deleted
inserted
replaced
| 17:abc084261ca0 | 18:0536743927c2 |
|---|---|
| 17 #define FALSE 0 | 17 #define FALSE 0 |
| 18 | 18 |
| 19 #define LOCKED 1 | 19 #define LOCKED 1 |
| 20 #define UNLOCKED 0 | 20 #define UNLOCKED 0 |
| 21 | 21 |
| 22 #define DEBUG_PRIVATE_Q | |
| 22 | 23 |
| 23 /* It is the data that is shared so only need one mutex. */ | 24 /* It is the data that is shared so only need one mutex. */ |
| 24 typedef struct | 25 typedef struct |
| 25 { void **insertPos; | 26 { void **insertPos; |
| 26 void **extractPos; | 27 void **extractPos; |
| 27 void **startOfData; //data is pointers | 28 void **startOfData; //data is pointers |
| 28 void **endOfData; //set when alloc data | 29 void **endOfData; //set when alloc data |
| 30 #ifdef DEBUG_PRIVATE_Q | |
| 31 int numWrites; | |
| 32 int numReads; | |
| 33 #endif | |
| 29 } | 34 } |
| 30 PrivQueueStruc; | 35 PrivQueueStruc; |
| 31 | 36 |
| 32 PrivQueueStruc* makePrivQ ( ); | 37 PrivQueueStruc* makePrivQ ( ); |
| 33 bool32 isEmptyPrivQ ( PrivQueueStruc *Q ); //ret TRUE if empty | 38 bool32 isEmptyPrivQ ( PrivQueueStruc *Q ); //ret TRUE if empty |
