xtos_ spsc_ capacity
Returns the maximum number of complete frames specified at queue creation.
On this page
Declaration
#include <xtos/spsc.h>
size_t xtos_spsc_capacity(const struct xtos_spsc_queue *queue);Parameters
| Parameter | Type | Description |
|---|---|---|
| queue | const struct xtos_spsc_queue * | Queue pointer; NULL returns 0. |
Return value
Returns the fixed capacity; returns 0 for NULL.
Errors
No errno error return. See Notes for input restrictions.
Notes
- capacity counts frames rather than bytes and need not be a power of two.
- The function allocates no memory or changes state; do not pass the pointer after destruction.
Example
Source
This reference describes headers and implementation at OpenXTOS commit dd313955ad57542bcd2af8827157d1bbd0cf5e83.