Initial commit
This commit is contained in:
20
inc/ptQueue.h
Normal file
20
inc/ptQueue.h
Normal file
@@ -0,0 +1,20 @@
|
||||
#ifndef __PT_QUEUE_H__
|
||||
#define __PT_QUEUE_H__
|
||||
|
||||
typedef struct ptQueueElem {
|
||||
_Atomic(struct ptQueueElem*) nextEl;
|
||||
_Atomic(void*) payload;
|
||||
} ptQueueElem;
|
||||
|
||||
|
||||
typedef struct {
|
||||
_Atomic(ptQueueElem*) head;
|
||||
_Atomic(ptQueueElem*) tail;
|
||||
} ptQueue;
|
||||
|
||||
|
||||
int ptQueuePush(ptQueue* q, void* payload, char* errbuf);
|
||||
ptQueue* ptQueueCreate(char* errbuf);
|
||||
void ptQueueFree(ptQueue* q);
|
||||
|
||||
#endif //ifndef __PT_QUEUE_H__
|
||||
Reference in New Issue
Block a user