20 #include <rte_compat.h> 84 #ifndef RTE_WAIT_UNTIL_EQUAL_ARCH_DEFINED 89 assert(memorder == __ATOMIC_ACQUIRE || memorder == __ATOMIC_RELAXED);
91 while (__atomic_load_n(addr, memorder) != expected)
99 assert(memorder == __ATOMIC_ACQUIRE || memorder == __ATOMIC_RELAXED);
101 while (__atomic_load_n(addr, memorder) != expected)
109 assert(memorder == __ATOMIC_ACQUIRE || memorder == __ATOMIC_RELAXED);
111 while (__atomic_load_n(addr, memorder) != expected)
133 #define RTE_WAIT_UNTIL_MASKED(addr, mask, cond, expected, memorder) do { \ 134 RTE_BUILD_BUG_ON(!__builtin_constant_p(memorder)); \ 135 RTE_BUILD_BUG_ON(memorder != __ATOMIC_ACQUIRE && \ 136 memorder != __ATOMIC_RELAXED); \ 137 typeof(*(addr)) expected_value = (expected); \ 138 while (!((__atomic_load_n((addr), (memorder)) & (mask)) cond \ static __rte_always_inline void rte_wait_until_equal_64(volatile uint64_t *addr, uint64_t expected, int memorder)
#define __rte_always_inline
static void rte_pause(void)
static __rte_always_inline void rte_wait_until_equal_16(volatile uint16_t *addr, uint16_t expected, int memorder)
static __rte_always_inline void rte_wait_until_equal_32(volatile uint32_t *addr, uint32_t expected, int memorder)