SELKIELogger  1.0.0
#include <pthread.h>
#include <stdbool.h>
#include "messages.h"
Include dependency graph for queue.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  msgqueue
 Represent a simple FIFO message queue. More...
 
struct  queueitem
 

Typedefs

typedef struct queueitem queueitem
 Each queue item is a message and pointer to the next queue entry, if any.
 
typedef struct msgqueue msgqueue
 Represent a simple FIFO message queue. More...
 

Functions

bool queue_init (msgqueue *queue)
 Ensure queue structure is set to known good values and marked valid. More...
 
void queue_destroy (msgqueue *queue)
 Invalidate queue and destroy all contents. More...
 
bool queue_push (msgqueue *queue, msg_t *item)
 Add a message to the tail of the queue. More...
 
bool queue_push_qi (msgqueue *queue, queueitem *item)
 Add a queue item to the tail of the queue. More...
 
msg_tqueue_pop (msgqueue *queue)
 Remove topmost item from the queue and return it, if queue is not empty. More...
 
int queue_count (const msgqueue *queue)
 Iterate over queue and return current number of items. More...
 

Detailed Description

Queue definition and handling functions

Definition in file queue.h.