1 post tagged #atomics.
#atomics
Asymmetric fences let you pay for a memory barrier only on the rare path. The common path gets a free compiler barrier; the uncommon path calls Linux membarrier(), which forces every other thread to run a full fence for you. Ryan Chung Yi Sheng's deep-dive follows the idea from the C++ standard down to the kernel, and finds a possible crack in the wording along the way.
// We use Google Analytics to understand which posts get traction and how the wro.cpp community grows. Anonymised, no ads, and you can decline -- the site works either way.