ant-http/lib/queue.h
2020-01-29 17:09:16 +01:00

22 lines
513 B
C

// code based on : https://github.com/majek/dump/blob/master/msqueue/queue.h
#ifndef QUEUE_H
#define QUEUE_H
struct queue_root;
struct queue_head {
void* data;
struct queue_head *next;
};
struct queue_root *ALLOC_QUEUE_ROOT();
void INIT_QUEUE_HEAD(struct queue_head *head);
void queue_put(struct queue_head *,struct queue_root *);
int queue_readable(struct queue_root *);
void queue_empty(struct queue_root *, void (*)(void*) );
struct queue_head *queue_get(struct queue_root *root);
#endif // QUEUE_H