10 #ifndef _RTE_RING_PEEK_C11_MEM_H_
11 #define _RTE_RING_PEEK_C11_MEM_H_
41 num = (n >= num) ? num : 0;
54 uint32_t num, uint32_t enqueue)
62 __atomic_store_n(&ht->
tail, pos, __ATOMIC_RELEASE);
75 __rte_ring_hts_get_tail(
struct rte_ring_hts_headtail *ht, uint32_t *tail,
79 union __rte_ring_hts_pos p;
81 p.raw = __atomic_load_n(&ht->ht.raw, __ATOMIC_RELAXED);
82 n = p.pos.head - p.pos.tail;
85 num = (n >= num) ? num : 0;
97 __rte_ring_hts_set_head_tail(
struct rte_ring_hts_headtail *ht, uint32_t tail,
98 uint32_t num, uint32_t enqueue)
100 union __rte_ring_hts_pos p;
104 p.pos.head = tail + num;
105 p.pos.tail = p.pos.head;
107 __atomic_store_n(&ht->ht.raw, p.raw, __ATOMIC_RELEASE);
#define __rte_always_inline