21 #ifndef SELKIELoggerBase_Queue
22 #define SELKIELoggerBase_Queue
int queue_count(const msgqueue *queue)
Iterate over queue and return current number of items.
struct msgqueue msgqueue
Represent a simple FIFO message queue.
bool queue_push(msgqueue *queue, msg_t *item)
Add a message to the tail of the queue.
msg_t * queue_pop(msgqueue *queue)
Remove topmost item from the queue and return it, if queue is not empty.
bool queue_push_qi(msgqueue *queue, queueitem *item)
Add a queue item to the tail of the queue.
void queue_destroy(msgqueue *queue)
Invalidate queue and destroy all contents.
bool queue_init(msgqueue *queue)
Ensure queue structure is set to known good values and marked valid.
Represent a simple FIFO message queue.
queueitem * head
Points to first message, or NULL if empty.
pthread_mutex_t lock
Queue lock.
queueitem * tail
brief Tail entry hint
msg_t * item
Queued message.
queueitem * next
Pointer to next item, or NULL for queue tail.