Re:Windows 10 on ARM
by StillBored on Friday May 12, 2017 @11:56AM
(#14325084)
That doesn't matter because a properly consistent lock will need a sequentially consistent store somewhere in the sequence, and that store will generate the barrier.Something like a ticket lock works in this case because the store will eventually become visible and when it does the ordering of operations proceeding it will have completed.
This is not always true. See [1] for an example. Because of the semantics of the x86 memory model a sequentially consistent load does not generate a lock'd instruction. When such loads are translated to ARM64, you need to introduce barriers or use a ldacq instruction.
[1] https://www.cl.cam.ac.uk/~pes20/cpp/cpp0xmappings.html