5#ifndef _RTE_SEQCOUNT_H_
6#define _RTE_SEQCOUNT_H_
24#include <rte_stdatomic.h>
34 RTE_ATOMIC(uint32_t)
sn;
40#define RTE_SEQCOUNT_INITIALIZER { .sn = 0 }
103 return rte_atomic_load_explicit(&seqcount->
sn, rte_memory_order_acquire);
151 end_sn = rte_atomic_load_explicit(&seqcount->
sn, rte_memory_order_relaxed);
156 return begin_sn != end_sn;
186 sn = seqcount->
sn + 1;
188 rte_atomic_store_explicit(&seqcount->
sn, sn, rte_memory_order_relaxed);
213 sn = seqcount->
sn + 1;
216 rte_atomic_store_explicit(&seqcount->
sn, sn, rte_memory_order_release);
static void rte_atomic_thread_fence(rte_memory_order memorder)
static void rte_seqcount_init(rte_seqcount_t *seqcount)
static void rte_seqcount_write_end(rte_seqcount_t *seqcount)
static uint32_t rte_seqcount_read_begin(const rte_seqcount_t *seqcount)
static bool rte_seqcount_read_retry(const rte_seqcount_t *seqcount, uint32_t begin_sn)
static void rte_seqcount_write_begin(rte_seqcount_t *seqcount)