comparison PrivateQueue.h @ 0:85af604dee9b

initial add
author Me
date Sat, 22 May 2010 19:51:09 -0700
parents
children 09cfa875abbd
comparison
equal deleted inserted replaced
-1:000000000000 0:92a2d420d4fd
1 /*
2 * Copyright 2009 OpenSourceStewardshipFoundation.org
3 * Licensed under GNU General Public License version 2
4 *
5 * Author: seanhalle@yahoo.com
6 */
7
8 #ifndef _PRIVATE_QUEUE_H
9 #define _PRIVATE_QUEUE_H
10
11 #include <pthread.h>
12
13 #define TRUE 1
14 #define FALSE 0
15
16 #define LOCKED 1
17 #define UNLOCKED 0
18
19
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;
28
29
30 PrivQueueStruc* makePrivQ ( );
31 void* readPrivQ ( PrivQueueStruc *Q );
32 void writePrivQ( void *in, PrivQueueStruc *Q );
33
34 #endif /* _PRIVATE_QUEUE_H */
35