Initial work for depacketizer

This commit is contained in:
Cameron Gutman
2014-01-18 19:39:00 -05:00
parent 103c052729
commit e2ba031729
8 changed files with 191 additions and 10 deletions
+18
View File
@@ -0,0 +1,18 @@
#include "platform.h"
#include "PlatformThreads.h"
typedef struct _LINKED_BLOCKING_QUEUE_ENTRY {
struct _LINKED_BLOCKING_QUEUE_ENTRY *next;
void* data;
} LINKED_BLOCKING_QUEUE_ENTRY, *PLINKED_BLOCKING_QUEUE_ENTRY;
typedef struct _LINKED_BLOCKING_QUEUE {
PLT_MUTEX mutex;
PLT_EVENT containsDataEvent;
int sizeBound;
PLINKED_BLOCKING_QUEUE_ENTRY head;
} LINKED_BLOCKING_QUEUE, *PLINKED_BLOCKING_QUEUE;
int initializeLinkedBlockingQueue(PLINKED_BLOCKING_QUEUE queueHead, int sizeBound);
int offerQueueItem(PLINKED_BLOCKING_QUEUE queueHead, void* data);
void* waitForQueueElement(PLINKED_BLOCKING_QUEUE queueHead);