Zephyr API Documentation
3.6.99
A Scalable Open Source RTOS
|
RTIO Multiple Producer Single Consumer (MPSC) Queue API. More...
Files | |
file | rtio_mpsc.h |
A wait-free intrusive multi producer single consumer (MPSC) queue using a singly linked list. | |
Data Structures | |
struct | rtio_mpsc_node |
Queue member. More... | |
struct | rtio_mpsc |
MPSC Queue. More... | |
Macros | |
#define | mpsc_ptr_get(ptr) atomic_ptr_get(&(ptr)) |
#define | mpsc_ptr_set(ptr, val) atomic_ptr_set(&(ptr), val) |
#define | mpsc_ptr_set_get(ptr, val) atomic_ptr_set(&(ptr), val) |
#define | RTIO_MPSC_INIT(symbol) |
Static initializer for a mpsc queue. | |
Typedefs | |
typedef atomic_ptr_t | mpsc_ptr_t |
Functions | |
static void | rtio_mpsc_init (struct rtio_mpsc *q) |
Initialize queue. | |
static ALWAYS_INLINE void | rtio_mpsc_push (struct rtio_mpsc *q, struct rtio_mpsc_node *n) |
Push a node. | |
static struct rtio_mpsc_node * | rtio_mpsc_pop (struct rtio_mpsc *q) |
Pop a node off of the list. | |
RTIO Multiple Producer Single Consumer (MPSC) Queue API.
#define mpsc_ptr_get | ( | ptr | ) | atomic_ptr_get(&(ptr)) |
#include <zephyr/rtio/rtio_mpsc.h>
#define mpsc_ptr_set | ( | ptr, | |
val | |||
) | atomic_ptr_set(&(ptr), val) |
#include <zephyr/rtio/rtio_mpsc.h>
#define mpsc_ptr_set_get | ( | ptr, | |
val | |||
) | atomic_ptr_set(&(ptr), val) |
#include <zephyr/rtio/rtio_mpsc.h>
#define RTIO_MPSC_INIT | ( | symbol | ) |
#include <zephyr/rtio/rtio_mpsc.h>
Static initializer for a mpsc queue.
Since the queue is
symbol | name of the queue |
typedef atomic_ptr_t mpsc_ptr_t |
#include <zephyr/rtio/rtio_mpsc.h>
|
inlinestatic |
|
inlinestatic |
#include <zephyr/rtio/rtio_mpsc.h>
Pop a node off of the list.
NULL | When no node is available |
node | When node is available |
|
static |
#include <zephyr/rtio/rtio_mpsc.h>
Push a node.
q | Queue to push the node to |
n | Node to push into the queue |