diff options
author | Adam Branes <adam@adam> | 2021-05-02 17:45:58 +0300 |
---|---|---|
committer | Adam Branes <adam@adam> | 2021-05-02 17:45:58 +0300 |
commit | a3e36c1918e63761dfc4d2221cca3636b98e93aa (patch) | |
tree | 143722876a02156b0b423de6248298b5cf8c0707 /queue.h | |
download | MEGATRON-a3e36c1918e63761dfc4d2221cca3636b98e93aa.tar.gz |
initial housekeeping done
Diffstat (limited to 'queue.h')
-rw-r--r-- | queue.h | 23 |
1 files changed, 23 insertions, 0 deletions
@@ -0,0 +1,23 @@ +#ifndef GQUEUE_H +#define GQUEUE_H GQUEUE_H +#include<stdlib.h> + + +struct Queue_Node +{ + void *data; + struct Queue_Node *prev; +}; + +struct Queue +{ + struct Queue_Node *first,*last; + size_t size; + +}; + +void Queue_Init(struct Queue *q); +void Queue_Push(struct Queue *q,void *data); +void* Queue_Pop(struct Queue *q); +void Queue_Destroy(struct Queue *q); +#endif |