1.. _spsc_pbuf: 2 3Single Producer Single Consumer Packet Buffer 4============================================= 5 6A :dfn:`Single Producer Single Consumer Packet Buffer (SPSC_PBUF)` is a circular 7buffer, whose contents are stored in first-in-first-out order. Variable size 8packets are stored in the buffer. Packet buffer works under assumption that there 9is a single context that produces packets and a single context that consumes the 10data. 11 12Implementation is focused on performance and memory footprint. 13 14Packets are added to the buffer using :c:func:`spsc_pbuf_write` which copies a 15data into the buffer. If the buffer is full error is returned. 16 17Packets are copied out of the buffer using :c:func:`spsc_pbuf_read`. 18