xtos_ spsc_ destroy
Frees the queue slots, their sample storage, and the queue itself.
On this page
Declaration
#include <xtos/spsc.h>
void xtos_spsc_destroy(struct xtos_spsc_queue *queue);Parameters
| Parameter | Type | Description |
|---|---|---|
| queue | struct 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 in OpenXTOS v1.0.2 (c24e923717670c4724cdaf24c7c105caee8dc2fb).