std::atomic_signal_fence(3)

πŸ“¦ version 2024.07.05, in nixpkgs unstable, opensuse-leap 16.0

πŸ’… 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