LibJuno 1.0.1
LibJuno is a lightweight C11 library designed specifically for embedded systems.
Loading...
Searching...
No Matches
juno_buff_queue.c File Reference
#include "juno/ds/array_api.h"
#include "juno/ds/queue_api.h"
#include "juno/macros.h"
#include "juno/status.h"
Include dependency graph for juno_buff_queue.c:

Functions

JUNO_STATUS_T JunoDs_QueuePush (JUNO_DS_QUEUE_ROOT_T *ptQueue, JUNO_POINTER_T tItem)
 Enqueue an item on the queue.
 
JUNO_STATUS_T JunoDs_QueuePop (JUNO_DS_QUEUE_ROOT_T *ptQueue, JUNO_POINTER_T tReturn)
 Dequeue an item from the queue.
 
JUNO_RESULT_POINTER_T JunoDs_QueuePeek (JUNO_DS_QUEUE_ROOT_T *ptQueue)
 Peek at the next item in the queue.
 
JUNO_STATUS_T JunoDs_QueueInit (JUNO_DS_QUEUE_ROOT_T *ptQueue, JUNO_DS_ARRAY_ROOT_T *ptQueueArray, JUNO_FAILURE_HANDLER_T pfcnFailureHdlr, JUNO_USER_DATA_T *pvFailureUserData)
 Initialize a buffer queue with a capacity.
 

Variables

static const JUNO_DS_QUEUE_API_T gtQueueApi
 

Function Documentation

◆ JunoDs_QueueInit()

JUNO_STATUS_T JunoDs_QueueInit ( JUNO_DS_QUEUE_ROOT_T ptQueue,
JUNO_DS_ARRAY_ROOT_T ptQueueArray,
JUNO_FAILURE_HANDLER_T  pfcnFailureHdlr,
JUNO_USER_DATA_T pvFailureUserData 
)

Initialize a buffer queue with a capacity.

Initialize a queue over a backing array with a given capacity.

◆ JunoDs_QueuePeek()

JUNO_RESULT_POINTER_T JunoDs_QueuePeek ( JUNO_DS_QUEUE_ROOT_T ptQueue)

Peek at the next item in the queue.

Peek at the item at the front without removing it (O(1)).

◆ JunoDs_QueuePop()

JUNO_STATUS_T JunoDs_QueuePop ( JUNO_DS_QUEUE_ROOT_T ptQueue,
JUNO_POINTER_T  tReturn 
)

Dequeue an item from the queue.

Dequeue the item at the front of the queue into tReturn (O(1)).

◆ JunoDs_QueuePush()

JUNO_STATUS_T JunoDs_QueuePush ( JUNO_DS_QUEUE_ROOT_T ptQueue,
JUNO_POINTER_T  tItem 
)

Enqueue an item on the queue.

Enqueue an item to the back of the queue (O(1)).

Variable Documentation

◆ gtQueueApi

const JUNO_DS_QUEUE_API_T gtQueueApi
static
Initial value:
=
{
}
JUNO_STATUS_T JunoDs_QueuePop(JUNO_DS_QUEUE_ROOT_T *ptQueue, JUNO_POINTER_T tReturn)
Dequeue an item from the queue.
Definition juno_buff_queue.c:49
JUNO_RESULT_POINTER_T JunoDs_QueuePeek(JUNO_DS_QUEUE_ROOT_T *ptQueue)
Peek at the next item in the queue.
Definition juno_buff_queue.c:76
JUNO_STATUS_T JunoDs_QueuePush(JUNO_DS_QUEUE_ROOT_T *ptQueue, JUNO_POINTER_T tItem)
Enqueue an item on the queue.
Definition juno_buff_queue.c:24