#include <malloc.h>
Go to the source code of this file.
Defines | |
#define | fifo_create(name) name.fifo = malloc(sizeof(*name.fifo) * name.items) |
Allocate memory for dynamic FIFO. | |
#define | FIFO_CREATE_STATIC(name, t, itms) |
#define | FIFO_INITIALIZE_DYNAMIC(name, t, itms) |
Create and prepare dynamic FIFO. | |
#define | FIFO_INITIALIZE_STATIC(name, t, itms) |
Create and initialize static FIFO. | |
#define | fifo_pop(name) name.fifo[name.head = (name.head + 1) < name.items ? (name.head + 1) : 0] |
Pop value from head of FIFO. | |
#define | fifo_push(name, value) name.fifo[name.tail = (name.tail + 1) < name.items ? (name.tail + 1) : 0] = (value) |
Push value to tail of FIFO. | |
Typedefs | |
typedef unsigned long | fifo_count_t |
typedef unsigned long | fifo_index_t |
Definition in file fifo.h.