2 ms·
> On ARM, those stores can become visible to other cores in any order. And I will repeat this again, for "correctly" written code this doesn't matter. Because
by StillBored 9y ago
> On ARM, those stores can become visible to other cores in any order.
And I will repeat this again, for "correctly" written code this doesn't matter. Because the data areas being stored to should be protected by _LOCKs_ which will enforce visibility. If you think your being clever and writing "lock free" code by depending on the memory model your likely fooling yourself.
- vardump 9y agoLock free code indeed does indeed need to rely on memory model. Relying on underlying machine model is not fooling oneself. Please don't conflate visibility with load/store order. It's a different matter. See how C++ memory model operations map to different processors, especially how many cases are simple loads or stores on x86. https://www.cl.cam.ac.uk/~pes20/cpp/cpp0xmappings.html https://www.cl.cam.ac.uk/~pes20/cpp/cpp0xmappings.html (link from another comment in this discussion)