std::atomic_signal_fence(3)
π
std::atomic_signal_fence(3) π
okay bestie, welcome to the std::atomic_signal_fence(3) page from the C++ Standard Libary β yes, that's the manual name in the header, and we are keeping it exactly. This one is a tiny compiler-vibes fence, and it slays in the most understated way. β¨
πΈ NAME πΈ
std::atomic_signal_fence β std::atomic_signal_fence
β¨ Synopsis β¨
Defined in header <atomic>:
extern "C" void atomic_signal_fence( std::memory_order order )
(since C++11)
noexcept;
okay so what does it do? It establishes memory synchronization ordering of non-atomic and relaxed atomic accesses, as instructed by order, between a thread and a signal handler executed on the same thread. This is equivalent to std::atomic_thread_fence, except no CPU instructions for memory ordering are issued. Only reordering of the instructions by the compiler is suppressed as order instructs. For example, a fence with release semantics prevents reads or writes from being moved past subsequent writes, and a fence with acquire semantics prevents reads or writes from being moved ahead of preceding reads. periodt. π«Ά
π Parameters π
orderβ the memory ordering executed by this fence.
π¦ Return value π¦
(none) β literally nothing comes back, bestie. π
π Example π
This section is incomplete Reason: no example
π See also π
memory_orderβ defines memory ordering constraints for the given atomic operation(C++11)(enum).atomic_thread_fenceβ generic memory order-dependent fence synchronization primitive(C++11)(function).- C documentation for
atomic_signal_fence.
π Category π
- Todo no example
source/version/date check: http://cppreference.com Β· 2024.06.10 Β· std::atomic_signal_fence(3). mwah πβ¨
π¦ 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