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 RTE_WAIT_UNTIL_MASKED(&pf->rd.in, RTE_PFLOCK_WBITS, !=, w,
141 __atomic_fetch_add(&pf->rd.out, RTE_PFLOCK_RINC, __ATOMIC_RELEASE);
162 ticket = __atomic_fetch_add(&pf->wr.in, 1, __ATOMIC_RELAXED);
173 w = RTE_PFLOCK_PRES | (ticket & RTE_PFLOCK_PHID);
174 ticket = __atomic_fetch_add(&pf->rd.in, w, __ATOMIC_RELAXED);
194 __atomic_fetch_and(&pf->rd.in, RTE_PFLOCK_LSB, __ATOMIC_RELEASE);
197 __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 __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)