RFR #2 (M) 8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
Andrew Haley
aph at redhat.com
Tue Jul 5 09:09:22 UTC 2016
On 04/07/16 22:09, David Holmes wrote:
> Surely cmpxchg already ensures the store (if it happens) is visible in
> other threads - else the cmpxchg would not even operate correctly.
No, it doesn't. Semantically, the cmpxchg is no more than an atomic
operation on a single word: it has no other memory ordering effects.
If you want the store to be observed before some other memory access
you have to do something to make that happen.
Andrew.
More information about the hotspot-dev
mailing list