20 #include <rte_stdatomic.h> 48 rte_memory_order memorder);
64 rte_memory_order memorder);
80 rte_memory_order memorder);
82 #ifndef RTE_WAIT_UNTIL_EQUAL_ARCH_DEFINED 85 rte_memory_order memorder)
87 assert(memorder == rte_memory_order_acquire || memorder == rte_memory_order_relaxed);
89 while (rte_atomic_load_explicit((
volatile __rte_atomic uint16_t *)addr, memorder)
96 rte_memory_order memorder)
98 assert(memorder == rte_memory_order_acquire || memorder == rte_memory_order_relaxed);
100 while (rte_atomic_load_explicit((
volatile __rte_atomic uint32_t *)addr, memorder)
107 rte_memory_order memorder)
109 assert(memorder == rte_memory_order_acquire || memorder == rte_memory_order_relaxed);
111 while (rte_atomic_load_explicit((
volatile __rte_atomic uint64_t *)addr, memorder)
132 #define RTE_WAIT_UNTIL_MASKED(addr, mask, cond, expected, memorder) do { \ 133 RTE_BUILD_BUG_ON(!__builtin_constant_p(memorder)); \ 134 RTE_BUILD_BUG_ON((memorder) != rte_memory_order_acquire && \ 135 (memorder) != rte_memory_order_relaxed); \ 136 typeof(*(addr)) expected_value = (expected); \ 137 while (!((rte_atomic_load_explicit((addr), (memorder)) & (mask)) \ 138 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)