>>>> Part of the motivation here is to fix heisenbugs. If I knew where
It certainly is better than disabling all compiler optimisations!
I look at it the other way: keeping the "volatile" semantics in
atomic_XXX() (or adding them to it, whatever) helps _prevent_ bugs;
certainly most people expect that behaviour, and also that behaviour
is *needed* in some places and no other interface provides that
functionality.
[some confusion about barriers wrt atomics snipped]
Segher
-