/*
 *  Copyright 2009 OpenSourceStewardshipFoundation.org
 *  Licensed under GNU General Public License version 2
 *
 * Author: seanhalle@yahoo.com
 */

#ifndef _PRIVATE_QUEUE_H
#define	_PRIVATE_QUEUE_H

#include <pthread.h>

#define TRUE     1
#define FALSE    0

#define LOCKED   1
#define UNLOCKED 0


/* It is the data that is shared so only need one mutex. */
typedef struct
 { void      **insertPos;
   void      **extractPos;
   void      **startOfData;  //data is pointers
   void      **endOfData;    //set when alloc data
 }
PrivQueueStruc;


PrivQueueStruc*  makePrivQ ( );
void*            readPrivQ ( PrivQueueStruc *Q );
void             writePrivQ( void *in, PrivQueueStruc *Q );

#endif	/* _PRIVATE_QUEUE_H */

