Readings of the day

https://www.kernel.org/doc/Documentation/memory-barriers.txt
https://en.cppreference.com/w/cpp/atomic/memory_order

I always found memory order difficult to understand.

I seen it before while working with C++, since in a previous job I used to
maintain a multi-threaded C++ daemon.

I stumbled into memory order while writing a device driver.  The device
driver is not designed as a multi-threaded application, but so it happens
that the controlled device works independently, and its behaviour might
effectively be affected by the re-ordering of instructions, operated by the
processor or by the compiler.

I've been pointed to the kernel documentation above, which is a very good
complement to what explained on cppreference.com.  As a matter of fact, it
allowed me to actually understand how the different memory barriers work.