libcproject
C static library easier to use than libc (C standard library).
queue.h File Reference
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include "types.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.

Data Structures

struct  queue
 Queue structure => FIFO (First In First Out). More...
 
struct  queue_node
 Queue node structure. More...
 

Functions

struct queuequeue_initialization ()
 Queue initialization. More...
 
void queue_push (struct queue *queue, void *data)
 Push data to queue. More...
 
void * queue_pop (struct queue *queue)
 Pop data from queue. More...
 
void queue_free (struct queue *queue)
 Frees the queue. More...
 

Data Structure Documentation

◆ queue

struct queue

Queue structure => FIFO (First In First Out).

Since
v1.0.0

Definition at line 14 of file queue.h.

Collaboration diagram for queue:
Data Fields
struct queue_node * first
size_t length

◆ queue_node

struct queue_node

Queue node structure.

Since
v1.0.0

Definition at line 23 of file queue.h.

Collaboration diagram for queue_node:
Data Fields
void * data
struct queue_node * next

Function Documentation

◆ queue_initialization()

struct queue* queue_initialization ( )

Queue initialization.

Returns
struct queue*
Since
v1.0.0

◆ queue_push()

void queue_push ( struct queue queue,
void *  data 
)

Push data to queue.

Parameters
queue
data
Since
v1.0.0

◆ queue_pop()

void* queue_pop ( struct queue queue)

Pop data from queue.

Parameters
queue
Returns
void*
Since
v1.0.0

◆ queue_free()

void queue_free ( struct queue queue)

Frees the queue.

Parameters
queue
Since
v3.0.0