Lockless patterns: full memory barriers
Lockless patterns: full memory barriers
Posted Mar 5, 2021 19:06 UTC (Fri) by pbonzini (subscriber, #60935)In reply to: Lockless patterns: full memory barriers by jcm
Parent article: Lockless patterns: full memory barriers
The genius stroke of C++11 compared to e.g. the Java memory model was to treat the compiler+processor combo as weak memory ordering even if the underlying architecture is TSO. I don't think any compiler applies very much the leeway that it's given, but it does make for a nice and consistent model at the language level.
I do prefer the LKMM and its clear foundation on the behavior of hardware (which I tried to convey in this article) to C++11's slightly too handwavy "just use sequential consistency unless you need something else".
Posted Mar 6, 2021 15:25 UTC (Sat)
by jcm (subscriber, #18262)
[Link] (3 responses)
Posted Mar 6, 2021 15:28 UTC (Sat)
by jcm (subscriber, #18262)
[Link]
Posted Mar 6, 2021 17:44 UTC (Sat)
by pbonzini (subscriber, #60935)
[Link] (1 responses)
Posted Mar 9, 2021 5:00 UTC (Tue)
by jcm (subscriber, #18262)
[Link]
Lockless patterns: full memory barriers
Lockless patterns: full memory barriers
Lockless patterns: full memory barriers
Lockless patterns: full memory barriers
