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.
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.