Mercurial > cgi-bin > hgwebdir.cgi > VMS > C_Libraries > Queue_impl
view PrivateQueue.h @ 12:3134d8a1e8e3
added pushPrivQ -- treats Q as stack, pushed elem is first out
| author | SeanHalle |
|---|---|
| date | Thu, 11 Nov 2010 04:19:01 -0800 |
| parents | 3562716ebdbd |
| children | 8fd77f9430f0 |
line source
1 /*
2 * Copyright 2009 OpenSourceStewardshipFoundation.org
3 * Licensed under GNU General Public License version 2
4 *
5 * Author: seanhalle@yahoo.com
6 */
8 #ifndef _PRIVATE_QUEUE_H
9 #define _PRIVATE_QUEUE_H
11 #include "../VMS_primitive_data_types.h"
13 #define TRUE 1
14 #define FALSE 0
16 #define LOCKED 1
17 #define UNLOCKED 0
20 typedef struct
21 { void **insertPos;
22 void **extractPos;
23 void **startOfData; //data is pointers
24 void **endOfData; //set when alloc data
25 }
26 PrivQueueStruc;
29 PrivQueueStruc* makePrivQ ( );
30 void* readPrivQ ( PrivQueueStruc *Q );
31 void writePrivQ( void *in, PrivQueueStruc *Q );
32 int32 writeIfSpacePrivQ( void * in, PrivQueueStruc* Q ); //return
33 // false when full
34 int32 numInPrivQ( PrivQueueStruc *Q );
35 void pushPrivQ( void * in, PrivQueueStruc* Q );
37 #endif /* _PRIVATE_QUEUE_H */
