4 ms·
On Intel processors, which have strong memory order, concurrency is fairly easy to reason about. On processors with weak memory ordering (ARM notably), things g
by rerdavies 4y ago
On Intel processors, which have strong memory order, concurrency is fairly easy to reason about. On processors with weak memory ordering (ARM notably), things get really treacherous.
I'm still settling in to the horrors of memory ordering on ARM. The one thing I know for sure, is that my oeuvre contains a trail of code that will work fine on Intel processors, but won't work on ARM (or any other processor with weak memory ordering). :-/
- rootw0rm 4y agoYou should always use memory fences on Intel when using atomics imo
- gpderetta 4y agoExplicit fences are extremely rarely needed on x86.
- gpderetta 4y agoIf you are using mutexes or other well defined abstractions, you need to care little about ordering. If you are writing atomic based code, you should be using something like C++11 and C11 atomics that will take care of fencing on all platforms.