Documentation Home >> Headers >> <atomic> Header >> std::atomic_signal_fence function

The std::atomic_signal_fence() function inserts a "memory barrier" or "fence" in the code to force memory ordering constraints between operations on a thread and operations in a signal handler on that thread.

std::atomic_signal_fence(std::memory_order order);

Effects:

Insert a fence with the required memory ordering constraints. This is equivalent to std::atomic_thread_fence(order) except that the constraints only apply between a thread and a signal handler on the same thread.

Throws:

Nothing.

Header

#include <atomic>

See Also