RFR 8181104 Fix specs for updateAndGet and related methods

Martin Buchholz martinrb at google.com
Tue Jun 13 01:56:51 UTC 2017

Looks good!

+ * accesses are guaranteed to be bitwise atomic only for references
+ * and primitive values of at most 32 bits, and impose no observable

I might sneak in another "for" before "primitive".

And of course, some year we should have a real updated memory model ...

On Mon, Jun 12, 2017 at 6:49 PM, Paul Sandoz <paul.sandoz at oracle.com> wrote:

> Hi,
> http://cr.openjdk.java.net/~psandoz/jdk9/JDK-8181104-
> updateAndGet-atomicty-ordering/webrev/index.html
> This patch fixes two spec issues:
> 1) j.u.concurrent.atomic.* classes now defer to VarHandles and package doc
> was removed. This inadvertently removed a clause about the memory order
> effects of the read-modify-write methods. So the relevant methods were
> updated.
> 2) The VarHandles CAS specification slightly changed the semantics of
> memory ordering effects when the CAS fails. A general paragraph was added
> specifying the effects of plain, opaque, acquire/release, and volatile
> operations.
> Thanks,
> Paul.

More information about the core-libs-dev mailing list