C++ includes atomics now, in a complete and portable way. That includes great and comprehensive support for different memory orders, to configure the implicit memory barriers.