Mercurial > cgi-bin > hgwebdir.cgi > VMS > C_Libraries > Queue_impl
diff PrivateQueue.h @ 0:85af604dee9b
initial add
| author | Me |
|---|---|
| date | Sat, 22 May 2010 19:51:09 -0700 |
| parents | |
| children | 09cfa875abbd |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/PrivateQueue.h Sat May 22 19:51:09 2010 -0700 1.3 @@ -0,0 +1,35 @@ 1.4 +/* 1.5 + * Copyright 2009 OpenSourceStewardshipFoundation.org 1.6 + * Licensed under GNU General Public License version 2 1.7 + * 1.8 + * Author: seanhalle@yahoo.com 1.9 + */ 1.10 + 1.11 +#ifndef _PRIVATE_QUEUE_H 1.12 +#define _PRIVATE_QUEUE_H 1.13 + 1.14 +#include <pthread.h> 1.15 + 1.16 +#define TRUE 1 1.17 +#define FALSE 0 1.18 + 1.19 +#define LOCKED 1 1.20 +#define UNLOCKED 0 1.21 + 1.22 + 1.23 +/* It is the data that is shared so only need one mutex. */ 1.24 +typedef struct 1.25 + { void **insertPos; 1.26 + void **extractPos; 1.27 + void **startOfData; //data is pointers 1.28 + void **endOfData; //set when alloc data 1.29 + } 1.30 +PrivQueueStruc; 1.31 + 1.32 + 1.33 +PrivQueueStruc* makePrivQ ( ); 1.34 +void* readPrivQ ( PrivQueueStruc *Q ); 1.35 +void writePrivQ( void *in, PrivQueueStruc *Q ); 1.36 + 1.37 +#endif /* _PRIVATE_QUEUE_H */ 1.38 +
