|
LibJuno 1.0.1
LibJuno is a lightweight C11 library designed specifically for embedded systems.
|
#include "juno/ds/array_api.h"#include "juno/ds/stack_api.h"#include "juno/macros.h"#include "juno/memory/memory_api.h"#include "juno/status.h"
Functions | |
| JUNO_STATUS_T | JunoDs_StackPush (JUNO_DS_STACK_ROOT_T *ptStack, JUNO_POINTER_T tItem) |
| Push an item onto the top of the stack (O(1)). | |
| JUNO_STATUS_T | JunoDs_StackPop (JUNO_DS_STACK_ROOT_T *ptStack, JUNO_POINTER_T tReturn) |
| Pop the top item into tReturn (O(1)). | |
| JUNO_RESULT_POINTER_T | JunoDs_StackPeek (JUNO_DS_STACK_ROOT_T *ptStack) |
| Peek at the top item without removing it (O(1)). | |
| JUNO_STATUS_T | JunoDs_StackInit (JUNO_DS_STACK_ROOT_T *ptStack, JUNO_DS_ARRAY_ROOT_T *ptStackArray, JUNO_FAILURE_HANDLER_T pfcnFailureHdlr, JUNO_USER_DATA_T *pvFailureUserData) |
| Initialize a buffer queue with a capacity. | |
Variables | |
| static const JUNO_DS_STACK_API_T | gtStackApi |
| JUNO_STATUS_T JunoDs_StackInit | ( | JUNO_DS_STACK_ROOT_T * | ptStack, |
| JUNO_DS_ARRAY_ROOT_T * | ptStackArray, | ||
| JUNO_FAILURE_HANDLER_T | pfcnFailureHdlr, | ||
| JUNO_USER_DATA_T * | pvFailureUserData | ||
| ) |
Initialize a buffer queue with a capacity.
Initialize a stack over a backing array with a given capacity.
| JUNO_RESULT_POINTER_T JunoDs_StackPeek | ( | JUNO_DS_STACK_ROOT_T * | ptStack | ) |
Peek at the top item without removing it (O(1)).
Peek at the next item in the queue
| JUNO_STATUS_T JunoDs_StackPop | ( | JUNO_DS_STACK_ROOT_T * | ptStack, |
| JUNO_POINTER_T | tReturn | ||
| ) |
Pop the top item into tReturn (O(1)).
Dequeue an item from the buffer
| JUNO_STATUS_T JunoDs_StackPush | ( | JUNO_DS_STACK_ROOT_T * | ptStack, |
| JUNO_POINTER_T | tItem | ||
| ) |
Push an item onto the top of the stack (O(1)).
Enqueue an item into the buffer
|
static |