* 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()
| 94 | * @see rte_seqcount_read_retry() |
| 95 | */ |
| 96 | static inline uint32_t |
| 97 | rte_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. |
no outgoing calls
no test coverage detected