stdatomic_flagtest_and_set(3)
std::atomic_flag::test_and_set - std::atomic_flag::test_and_set
Synopsis
Defined in header <atomic>
bool test_and_set(std::memory_order order = std::memory_order_seq_cst) volatile noexcept; (1) (since C++11)
bool test_and_set(std::memory_order order = std::memory_order_seq_cst) noexcept; (2) (since C++11)Atomically changes the state of a std::atomic_flag to set (true) and returns the value it held before.
Parameters
order - the memory synchronization ordering for this operation
See also