[jmm-dev] Make load/store of 64-bit long and double atomic

Andrew Haley aph at redhat.com
Tue Jul 12 12:31:11 UTC 2016


On 12/07/16 13:22, Paul Sandoz wrote:
> It does state it here:
> 
> * Read/write access modes (if supported), with the exception of
> * {@code get} and {@code set}, provide atomic access for
> * reference types and all primitive types.
> 
> Before the “unless stated otherwise…” quoted above.
> 
> As part of the sweep through the specification we should make that clearer.

It's very hard to understand what is going on.  compareAndExchange()
has stronger ordering semantics than compareAndExchangeRelease() but
set() has weaker ordering semantics than setRelease().  We're making a
real mess that nobody is going to thank us for.

Andrew.


More information about the jmm-dev mailing list