Entry header file to the library.
More...
#include <stdbool.h>
#include <sys/types.h>
Go to the source code of this file.
Entry header file to the library.
- Author
- Saurav Pal (resyfer)
- Bug:
- No known bugs
◆ queue_node_t
Nodes in the queue.
The building blocks of queue
◆ queue_back()
void * queue_back |
( |
queue_t * |
queue | ) |
|
Peek the last element of the queue.
- Parameters
-
- Returns
- void* Last element
◆ queue_empty()
bool queue_empty |
( |
queue_t * |
queue | ) |
|
Check if queue is empty.
- Parameters
-
- Returns
- true If queue is empty
-
false If queue is not empty
◆ queue_free()
Free the queue's elements.
- Warning
- This does not free the queue data structure itself but the elemental blocks it uses. Also it does not free the elements added to the queue.
- Parameters
-
◆ queue_front()
void * queue_front |
( |
queue_t * |
queue | ) |
|
Peek the front element of the queue.
- Parameters
-
- Returns
- void* Front element
◆ queue_new()
Initialize a queue.
- Parameters
-
queue | A queue instance to initialize |
◆ queue_pop()
void * queue_pop |
( |
queue_t * |
queue | ) |
|
Pop elements from the front of the queue.
- Parameters
-
- Returns
- void* Value of the element popped.
◆ queue_push()
void queue_push |
( |
queue_t * |
queue, |
|
|
void * |
value |
|
) |
| |
Push elements to the back of the queue.
- Parameters
-
queue | Queue instance |
value | Value to push |