2020-01-28 18:02:09 +01:00
|
|
|
// 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 *);
|
2020-01-29 17:09:16 +01:00
|
|
|
int queue_readable(struct queue_root *);
|
|
|
|
void queue_empty(struct queue_root *, void (*)(void*) );
|
2020-01-28 18:02:09 +01:00
|
|
|
struct queue_head *queue_get(struct queue_root *root);
|
|
|
|
|
|
|
|
#endif // QUEUE_H
|