8#ifndef ZEPHYR_RTIO_MPSC_H_
9#define ZEPHYR_RTIO_MPSC_H_
38#if defined(CONFIG_SMP)
42#define mpsc_ptr_get(ptr) atomic_ptr_get(&(ptr))
43#define mpsc_ptr_set(ptr, val) atomic_ptr_set(&(ptr), val)
44#define mpsc_ptr_set_get(ptr, val) atomic_ptr_set(&(ptr), val)
50#define mpsc_ptr_get(ptr) ptr
51#define mpsc_ptr_set(ptr, val) ptr = val
52#define mpsc_ptr_set_get(ptr, val) \
54 mpsc_ptr_t tmp = ptr; \
100#define RTIO_MPSC_INIT(symbol) \
102 .head = (struct rtio_mpsc_node *)&symbol.stub, \
103 .tail = (struct rtio_mpsc_node *)&symbol.stub, \
153 if (tail == &q->
stub) {
static ALWAYS_INLINE unsigned int arch_irq_lock(void)
Disable all interrupts on the local CPU.
Definition: irq.h:168
static ALWAYS_INLINE void arch_irq_unlock(unsigned int key)
Definition: irq.h:176
void * atomic_ptr_t
Definition: atomic_types.h:17
#define ALWAYS_INLINE
Definition: common.h:129
static struct rtio_mpsc_node * rtio_mpsc_pop(struct rtio_mpsc *q)
Pop a node off of the list.
Definition: rtio_mpsc.h:146
atomic_ptr_t mpsc_ptr_t
Definition: rtio_mpsc.h:40
static ALWAYS_INLINE void rtio_mpsc_push(struct rtio_mpsc *q, struct rtio_mpsc_node *n)
Push a node.
Definition: rtio_mpsc.h:127
static void rtio_mpsc_init(struct rtio_mpsc *q)
Initialize queue.
Definition: rtio_mpsc.h:114
#define mpsc_ptr_set(ptr, val)
Definition: rtio_mpsc.h:43
#define mpsc_ptr_get(ptr)
Definition: rtio_mpsc.h:42
#define mpsc_ptr_set_get(ptr, val)
Definition: rtio_mpsc.h:44
Queue member.
Definition: rtio_mpsc.h:80
mpsc_ptr_t next
Definition: rtio_mpsc.h:81
MPSC Queue.
Definition: rtio_mpsc.h:87
mpsc_ptr_t head
Definition: rtio_mpsc.h:88
struct rtio_mpsc_node stub
Definition: rtio_mpsc.h:90
struct rtio_mpsc_node * tail
Definition: rtio_mpsc.h:89