XTOS / OPEN SOURCE REAL-TIME SYSTEMOPEN SOURCE · VERSION 0.9.0 · BUILD FROM SOURCE
libxtos-rtxtos_spsc_capacity

xtos_spsc_capacity

Returns the maximum number of complete frames specified at queue creation.

On this page

Declaration

c
#include <xtos/spsc.h>

size_t xtos_spsc_capacity(const struct xtos_spsc_queue *queue);

Parameters

ParameterTypeDescription
queueconst 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.