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

xtos_spsc_destroy

Frees the queue slots, their sample storage, and the queue itself.

On this page

Declaration

c
#include <xtos/spsc.h>

void xtos_spsc_destroy(struct xtos_spsc_queue *queue);

Parameters

ParameterTypeDescription
queuestruct xtos_spsc_queue *A queue returned by xtos_spsc_create; NULL is a no-op.

Return value

Returns no value; cleanup failure cannot be reported.

Errors

No errno error return. See Notes for input restrictions.

Notes

  • Stop all push/pop callers first; destroying concurrently with either endpoint is unsafe.
  • The function frees internal heap storage and never frees caller-owned frames or samples_nv.

Example

Source

This reference describes headers and implementation at OpenXTOS commit dd313955ad57542bcd2af8827157d1bbd0cf5e83.