11#ifndef _RTE_RING_C11_PVT_H_
12#define _RTE_RING_C11_PVT_H_
16 uint32_t new_val, uint32_t single, uint32_t enqueue)
33 __atomic_store_n(&ht->
tail, new_val, __ATOMIC_RELEASE);
60__rte_ring_move_prod_head(
struct rte_ring *r,
unsigned int is_sp,
62 uint32_t *old_head, uint32_t *new_head,
63 uint32_t *free_entries)
65 const uint32_t capacity = r->
capacity;
77 *old_head = __atomic_load_n(&r->prod.
head, __ATOMIC_ACQUIRE);
88 cons_tail = __atomic_load_n(&r->cons.
tail, __ATOMIC_ACQUIRE);
95 *free_entries = (capacity + cons_tail - *old_head);
105 *new_head = *old_head + n;
107 r->prod.
head = *new_head, success = 1;
119 success = __atomic_compare_exchange_n(&r->prod.
head,
151__rte_ring_move_cons_head(
struct rte_ring *r,
int is_sc,
153 uint32_t *old_head, uint32_t *new_head,
156 unsigned int max = n;
167 *old_head = __atomic_load_n(&r->cons.
head, __ATOMIC_ACQUIRE);
178 prod_tail = __atomic_load_n(&r->prod.
tail, __ATOMIC_ACQUIRE);
185 *entries = (prod_tail - *old_head);
194 *new_head = *old_head + n;
196 r->cons.
head = *new_head, success = 1;
208 success = __atomic_compare_exchange_n(&r->cons.
head,
#define __rte_always_inline
static __rte_always_inline void rte_wait_until_equal_32(volatile uint32_t *addr, uint32_t expected, int memorder)