dynamic_fifo.c File Reference

Dynamic first in first out positive integer queue implementation. More...

#include <adt/dynamic_fifo.h>
#include <errno.h>
#include <malloc.h>
#include <mem.h>

Go to the source code of this file.

Defines

#define DYN_FIFO_MAGIC_VALUE   0x58627659
 Internal magic value for a consistency check.
#define NEXT_INDEX(fifo, index)   (((index) + 1) % ((fifo)->size + 1))
 Returns the next queue index.

Functions

int dyn_fifo_destroy (dyn_fifo_t *fifo)
 Clears and destroys the queue.
int dyn_fifo_initialize (dyn_fifo_t *fifo, int size)
 Initializes the dynamic queue.
static int dyn_fifo_is_valid (dyn_fifo_t *fifo)
 Checks if the queue is valid.
int dyn_fifo_pop (dyn_fifo_t *fifo)
 Returns and excludes the first item in the queue.
int dyn_fifo_push (dyn_fifo_t *fifo, int value, int max_size)
 Appends a new item to the queue end.
int dyn_fifo_value (dyn_fifo_t *fifo)
 Returns and keeps the first item in the queue.


Detailed Description

Dynamic first in first out positive integer queue implementation.

Definition in file dynamic_fifo.c.


Generated on Thu Jun 2 07:45:52 2011 for HelenOS/USB by  doxygen 1.4.7