Multiple Producer Single Consumer (MPSC) Lockfree Queue API .
More...
|
file | mpsc_lockfree.h |
| A wait-free intrusive multi producer single consumer (MPSC) queue using a singly linked list.
|
|
Multiple Producer Single Consumer (MPSC) Lockfree Queue API .
◆ MPSC_INIT
#define MPSC_INIT |
( |
| symbol | ) |
|
#include <zephyr/sys/mpsc_lockfree.h>
Value: { \
.stub = { \
.next = NULL, \
}, \
}
Queue member.
Definition mpsc_lockfree.h:79
Static initializer for a mpsc queue.
Since the queue is
- Parameters
-
◆ mpsc_ptr_get
#define mpsc_ptr_get |
( |
| ptr | ) |
|
#include <zephyr/sys/mpsc_lockfree.h>
Value:
atomic_ptr_val_t atomic_ptr_get(const atomic_ptr_t *target)
Atomic get a pointer value.
◆ mpsc_ptr_set
#define mpsc_ptr_set |
( |
| ptr, |
|
|
| val ) |
#include <zephyr/sys/mpsc_lockfree.h>
Value:
atomic_ptr_val_t atomic_ptr_set(atomic_ptr_t *target, atomic_ptr_val_t value)
Atomic get-and-set for pointer values.
◆ mpsc_ptr_set_get
#define mpsc_ptr_set_get |
( |
| ptr, |
|
|
| val ) |
◆ mpsc_ptr_t
◆ mpsc_init()
static void mpsc_init |
( |
struct mpsc * | q | ) |
|
|
inlinestatic |
◆ mpsc_pop()
#include <zephyr/sys/mpsc_lockfree.h>
Pop a node off of the list.
- Return values
-
NULL | When no node is available |
node | When node is available |
◆ mpsc_push()