14 memset(_pad0, 0,
sizeof(cache_line_pad));
15 memset(_pad1, 0,
sizeof(cache_line_pad));
40 seq0 = _seq.load(std::memory_order_acquire);
41 std::atomic_signal_fence(std::memory_order_acq_rel);
43 std::atomic_signal_fence(std::memory_order_acq_rel);
44 seq1 = _seq.load(std::memory_order_acquire);
45 }
while ((seq0 != seq1) || (seq0 & 1));
53 size_t seq0 = _seq.load(std::memory_order_relaxed);
54 _seq.store(seq0 + 1, std::memory_order_release);
55 std::atomic_signal_fence(std::memory_order_acq_rel);
57 std::atomic_signal_fence(std::memory_order_acq_rel);
58 _seq.store(seq0 + 2, std::memory_order_release);
Sequential lock synchronization primitive.
void Write(const T &data) noexcept
Write data under the sequential lock.
T Read() const noexcept
Read data under the sequential lock.
SeqLock & operator=(const T &data) noexcept
C++ Common project definitions.