An introduction to lockless algorithms
An introduction to lockless algorithms
Posted Feb 20, 2021 9:13 UTC (Sat) by pbonzini (subscriber, #60935)In reply to: An introduction to lockless algorithms by kurogane
Parent article: An introduction to lockless algorithms
Yes, exactly.
On one hand it may not happen on all processors, and details may vary depending on the microarchitecture. On x86 that reordering cannot happen, on ARM and PowerPC it might.
But on the other hand the compiler might always be reordering stuff behind your back. The big insight of the C++ committee was that the same abstraction could cover both processor-level and compiler-level reorderings.
