atomic_flag flag; assert(!atomic_flag_test_and_set_explicit_impl(&flag, memory_order.memory_order_seq_cst)); atomic_flag_clear_explicit_impl(&flag, memory_order.memory_order_seq_cst);
See Implementation