view PrivateQueue.h @ 9:62326cc8e6f4

This branch has replace malloc and free with VMS__malloc and VMS__free
author Me
date Sun, 31 Oct 2010 20:24:00 -0700
parents 09cfa875abbd
children 3562716ebdbd 1ed562d601d9
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 <pthread.h>
13 #define TRUE 1
14 #define FALSE 0
16 #define LOCKED 1
17 #define UNLOCKED 0
20 /* It is the data that is shared so only need one mutex. */
21 typedef struct
22 { void **insertPos;
23 void **extractPos;
24 void **startOfData; //data is pointers
25 void **endOfData; //set when alloc data
26 }
27 PrivQueueStruc;
30 PrivQueueStruc* makePrivQ ( );
31 void* readPrivQ ( PrivQueueStruc *Q );
32 void writePrivQ( void *in, PrivQueueStruc *Q );
33 int writeIfSpacePrivQ( void * in, PrivQueueStruc* Q ); //return
34 // false when full
36 #endif /* _PRIVATE_QUEUE_H */