10 #define _RTE_PFLOCK_H_ 69 #define RTE_PFLOCK_WBITS 0x3 70 #define RTE_PFLOCK_PRES 0x2 71 #define RTE_PFLOCK_PHID 0x1 72 #define RTE_PFLOCK_LSB 0xFFF0 73 #define RTE_PFLOCK_RINC 0x10 78 #define RTE_PFLOCK_INITIALIZER { } 118 w = __atomic_fetch_add(&pf->rd.in, RTE_PFLOCK_RINC, __ATOMIC_ACQUIRE)
124 while ((__atomic_load_n(&pf->rd.in, __ATOMIC_ACQUIRE)
125 & RTE_PFLOCK_WBITS) == w)
142 __atomic_fetch_add(&pf->rd.out, RTE_PFLOCK_RINC, __ATOMIC_RELEASE);
163 ticket = __atomic_fetch_add(&pf->wr.in, 1, __ATOMIC_RELAXED);
174 w = RTE_PFLOCK_PRES | (ticket & RTE_PFLOCK_PHID);
175 ticket = __atomic_fetch_add(&pf->rd.in, w, __ATOMIC_RELAXED);
195 __atomic_fetch_and(&pf->rd.in, RTE_PFLOCK_LSB, __ATOMIC_RELEASE);
198 __atomic_fetch_add(&pf->wr.out, 1, __ATOMIC_RELEASE);
static __rte_experimental void rte_pflock_write_lock(rte_pflock_t *pf)
static __rte_experimental void rte_pflock_init(struct rte_pflock *pf)
static __rte_experimental void rte_pflock_read_unlock(rte_pflock_t *pf)
static __rte_experimental void rte_pflock_read_lock(rte_pflock_t *pf)
static void rte_pause(void)
static __rte_experimental void rte_pflock_write_unlock(rte_pflock_t *pf)
static __rte_always_inline void rte_wait_until_equal_16(volatile uint16_t *addr, uint16_t expected, int memorder)