enum error_code error_code_t
Enumeration of error codes.
int cqueue_isfull(const cqueue_t *queue)
Check if the given circular queue is full.
void cqueue_close(cqueue_t *queue)
Close the given circular queue.
error_code_t cqueue_add(cqueue_t *queue, int item)
Add a value to the circular queue.
error_code_t cqueue_get(cqueue_t *queue, int *item)
Get the current value from the circular queue, removing it from the queue.
error_code_t cqueue_lookup(const cqueue_t *queue, int *item, unsigned int seek)
Get a value from the circular queue, without removing it from the queue.
void cqueue_init(cqueue_t *queue, unsigned int max_length)
Initializes a circular queue.
int cqueue_isempty(const cqueue_t *queue)
Check if the given circular queue is empty.
struct cqueue cqueue_t
Circular queue of integers.