10 #define _RTE_PFLOCK_H_ 34 #include <rte_compat.h> 70 #define RTE_PFLOCK_WBITS 0x3 71 #define RTE_PFLOCK_PRES 0x2 72 #define RTE_PFLOCK_PHID 0x1 73 #define RTE_PFLOCK_LSB 0xFFF0 74 #define RTE_PFLOCK_RINC 0x10 79 #define RTE_PFLOCK_INITIALIZER { } 119 w = __atomic_fetch_add(&pf->rd.in, RTE_PFLOCK_RINC, __ATOMIC_ACQUIRE)
125 RTE_WAIT_UNTIL_MASKED(&pf->rd.in, 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 __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)