MCPcopy Create free account
hub / github.com/F-Stack/f-stack / rte_seqcount_read_begin

Function rte_seqcount_read_begin

dpdk/lib/eal/include/rte_seqcount.h:96–104  ·  view source on GitHub ↗

* Begin a read-side critical section. * * A call to this function marks the beginning of a read-side critical * section, for @p seqcount. * * rte_seqcount_read_begin() returns a sequence number, which is later * used in rte_seqcount_read_retry() to check if the protected data * underwent any modifications during the read transaction. * * After (in program order) rte_seqcount_read_begin()

Source from the content-addressed store, hash-verified

94 * @see rte_seqcount_read_retry()
95 */
96static inline uint32_t
97rte_seqcount_read_begin(const rte_seqcount_t *seqcount)
98{
99 /* rte_memory_order_acquire to prevent loads after (in program order)
100 * from happening before the sn load. Synchronizes-with the
101 * store release in rte_seqcount_write_end().
102 */
103 return rte_atomic_load_explicit(&seqcount->sn, rte_memory_order_acquire);
104}
105
106/**
107 * End a read-side critical section.

Callers 1

rte_seqlock_read_beginFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected