20 #include <rte_stdatomic.h> 44 rte_memory_order memorder);
60 rte_memory_order memorder);
76 rte_memory_order memorder);
78 #ifndef RTE_WAIT_UNTIL_EQUAL_ARCH_DEFINED 81 rte_memory_order memorder)
83 assert(memorder == rte_memory_order_acquire || memorder == rte_memory_order_relaxed);
85 while (rte_atomic_load_explicit((
volatile __rte_atomic uint16_t *)addr, memorder)
92 rte_memory_order memorder)
94 assert(memorder == rte_memory_order_acquire || memorder == rte_memory_order_relaxed);
96 while (rte_atomic_load_explicit((
volatile __rte_atomic uint32_t *)addr, memorder)
103 rte_memory_order memorder)
105 assert(memorder == rte_memory_order_acquire || memorder == rte_memory_order_relaxed);
107 while (rte_atomic_load_explicit((
volatile __rte_atomic uint64_t *)addr, memorder)
128 #define RTE_WAIT_UNTIL_MASKED(addr, mask, cond, expected, memorder) do { \ 129 RTE_BUILD_BUG_ON(!__builtin_constant_p(memorder)); \ 130 RTE_BUILD_BUG_ON((memorder) != rte_memory_order_acquire && \ 131 (memorder) != rte_memory_order_relaxed); \ 132 typeof(*(addr)) expected_value = (expected); \ 133 while (!((rte_atomic_load_explicit((addr), (memorder)) & (mask)) \ 134 cond expected_value)) \ #define __rte_always_inline
static __rte_always_inline void rte_wait_until_equal_32(volatile uint32_t *addr, uint32_t expected, rte_memory_order memorder)
static __rte_always_inline void rte_wait_until_equal_16(volatile uint16_t *addr, uint16_t expected, rte_memory_order memorder)
static __rte_always_inline void rte_wait_until_equal_64(volatile uint64_t *addr, uint64_t expected, rte_memory_order memorder)
static void rte_pause(void)