std::atomic...ar_explicit(3)
std::atomic_flag_clear,std::atomic_flag_clear_explicit π
okay so this is the std::atomic...ar_explicit(3) page from the C++ Standard Libary manual, section 3 β yes, thatβs the exact spelling in the header, no cap. Welcome to the group chat, bestie. β¨
β¨ NAME β¨
std::atomic_flag_clear,std::atomic_flag_clear_explicit - std::atomic_flag_clear,std::atomic_flag_clear_explicit
πΈ Synopsis πΈ
hereβs the exact code, periodt:
Defined in header <atomic>
void atomic_flag_clear( volatile std::atomic_flag* obj ) noexcept;
(1) (since C++11)
void atomic_flag_clear( std::atomic_flag* obj ) noexcept;
(2) (since C++11)
void atomic_flag_clear_explicit( volatile std::atomic_flag* obj,
std::memory_order order )
(3) (since C++11)
noexcept;
void atomic_flag_clear_explicit( std::atomic_flag* obj,
std::memory_order order )
(4) (since C++11)
noexcept;
π Parameters π
objβ pointer tostd::atomic_flagto access π«Άorderβ the memory synchronization ordering π
π Notes π
std::atomic_flag_clear and std::atomic_flag_clear_explicit can be implemented as obj->clear() and obj->clear(order) respectively. slay. π
πΈ Defect reports πΈ
The following behavior-changing defect reports were applied retroactively to previously published C++ standards.
- DR:
LWG 2138Β· Applied to: C++11 Β· Behavior as published:ordercould bestd::memory_order_consumeΒ· Correct behavior: the behavior is undefined in this case.
π See also π
atomic_flagβ the lock-free boolean atomic type (C++11) (class) πatomic_flag_test_and_setβ atomically sets the flag to true and returns its previous value (C++11) (function) π₯atomic_flag_test_and_set_explicitβ atomically sets the flag to true and returns its previous value (C++11) (function) π₯memory_orderβ defines memory ordering constraints for the given atomic operation (C++11) (enum) π- C documentation for
atomic_flag_clear,atomic_flag_clear_explicitπ
π source: http://cppreference.com Β· version/date: 2024.06.10 Β· page: std::atomic...ar_explicit(3) β bye bestie, go clear those flags responsibly! π«Ά
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms