comparison PrivateQueue.h @ 34:c5d2f2a94133

updated to fixed versions from MC_shared brch, then removed VMS_ from malloc
author Some Random Person <seanhalle@yahoo.com>
date Wed, 14 Mar 2012 23:02:28 -0700
parents 1ed562d601d9
children d6da470bbd38
comparison
equal deleted inserted replaced
6:659990943990 14:f521c4d4c953
6 */ 6 */
7 7
8 #ifndef _PRIVATE_QUEUE_H 8 #ifndef _PRIVATE_QUEUE_H
9 #define _PRIVATE_QUEUE_H 9 #define _PRIVATE_QUEUE_H
10 10
11 #include <pthread.h> 11
12 #include "VMS_impl/VMS_primitive_data_types.h"
13
12 14
13 #define TRUE 1 15 #define TRUE 1
14 #define FALSE 0 16 #define FALSE 0
15 17
16 #define LOCKED 1 18 #define LOCKED 1
24 void **startOfData; //data is pointers 26 void **startOfData; //data is pointers
25 void **endOfData; //set when alloc data 27 void **endOfData; //set when alloc data
26 } 28 }
27 PrivQueueStruc; 29 PrivQueueStruc;
28 30
31 typedef void (*DynArrayFnPtr) ( void * ); //fn has to cast void *
29 32
30 PrivQueueStruc* makePrivQ ( ); 33 PrivQueueStruc* makePrivQ ( );
31 void* readPrivQ ( PrivQueueStruc *Q ); 34 void* readPrivQ ( PrivQueueStruc *Q ); //ret NULL if empty
32 void writePrivQ( void *in, PrivQueueStruc *Q ); 35 void writePrivQ( void *in, PrivQueueStruc *Q );
33 int writeIfSpacePrivQ( void * in, PrivQueueStruc* Q ); //return 36 //return false when full
34 // false when full 37 bool32 writeIfSpacePrivQ( void * in, PrivQueueStruc* Q );
38 int32 numInPrivQ( PrivQueueStruc *Q );
39 void pushPrivQ( void * in, PrivQueueStruc* Q );
40 void freePrivQ( PrivQueueStruc *Q );
35 41
36 #endif /* _PRIVATE_QUEUE_H */ 42 #endif /* _PRIVATE_QUEUE_H */
37 43