Multi Producer Single Consumer Lock Free Queue
A Multi Producer Single Consumer Lock Free Queue (MPSC) is an lockfree intrusive queue based on atomic pointer swaps as described by Dmitry Vyukov at 1024cores.
API Reference
- group mpsc_lockfree
Multiple Producer Single Consumer (MPSC) Lockfree Queue API.
Defines
-
mpsc_ptr_get(ptr)
-
mpsc_ptr_set(ptr, val)
-
mpsc_ptr_set_get(ptr, val)
-
MPSC_INIT(symbol)
Static initializer for a mpsc queue.
Since the queue is
- Parameters:
symbol – name of the queue
Typedefs
-
typedef atomic_ptr_t mpsc_ptr_t
Functions
-
static inline void mpsc_init(struct mpsc *q)
Initialize queue.
- Parameters:
q – Queue to initialize or reset
-
struct mpsc_node
- #include <mpsc_lockfree.h>
Queue member.
-
struct mpsc
- #include <mpsc_lockfree.h>
MPSC Queue.
-
mpsc_ptr_get(ptr)