My Kernel v0.1.0
queue.h File Reference
#include <stdbool.h>
#include "linked_list.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.

Macros

#define __QUEUE_INIT   __LLIST_INIT
 Default value for queue (empty)
 
#define __INIT_QUEUE   __INIT_LLIST
 Initialize an empty queue.
 
#define DECLARE_QUEUE   DECLARE_LLIST
 Declare an empty queue.
 

Typedefs

typedef llist_t queue_t
 A queue instance. More...
 

Functions

static bool queue_is_empty (const queue_t *queue)
 
static void queue_enqueue (queue_t *queue, node_t *new)
 Insert the new element as the tail of the queue.
 
static node_tqueue_dequeue (queue_t *queue)
 Pop the head from the queue. More...
 
static const node_tqueue_peek (const queue_t *queue)
 
static void queue_enqueue_all (queue_t *queue, llist_t *elements)
 Insert all the elements of a list into a queue. More...