|
QUEUE_LIB Embedded C library v1.0.0
|
Deterministic, generic FIFO queue for embedded / safety-critical systems. More...
#include <stdint.h>#include <stdbool.h>

Go to the source code of this file.
Data Structures | |
| struct | queue_t |
| FIFO queue control structure. More... | |
Enumerations | |
| enum | queue_status_t { QUEUE_OK = 0U , QUEUE_FULL = 1U , QUEUE_EMPTY = 2U , QUEUE_ERROR = 3U } |
| Queue operation status codes. More... | |
Functions | |
| queue_status_t | queue_init (queue_t *q, void *buffer, uint16_t buffer_element_size, uint16_t queue_capacity) |
| Initialize a queue instance. More... | |
| queue_status_t | queue_push (queue_t *q, const void *item) |
| Push (enqueue) one element into the queue. More... | |
| queue_status_t | queue_pop (queue_t *q, void *item) |
| Pop (dequeue) one element from the queue. More... | |
| bool | queue_is_empty (const queue_t *q) |
| Check if queue is empty. More... | |
| bool | queue_is_full (const queue_t *q) |
| Check if queue is full. More... | |
Deterministic, generic FIFO queue for embedded / safety-critical systems.
This module implements a type-agnostic, deterministic FIFO queue designed for embedded and safety-critical environments (IEC 61508 / ISO 26262).
The implementation:
MISRA Deviation: DV-QUEUE-001 (Rule 11.4) Controlled cast from void* to uint8_t* for raw byte-level copy operations. Safe and justified — no aliasing or type reinterpretation occurs.
copy_bytes(uint8_t*, const uint8_t*, uint16_t) is tested indirectly via unit tests in the DV_QUEUE_001 suite, covering NULL pointers and boundary conditions.