Initial commit

This commit is contained in:
2025-01-21 19:15:22 +03:00
commit 075196fcb6
5 changed files with 407 additions and 0 deletions

20
inc/ptQueue.h Normal file
View 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__