JDK-8133451 : Add weak CAS, and acquire/release forms of CAS
  • Type: Sub-task
  • Component: core-libs
  • Sub-Component: java.lang.invoke
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2015-08-12
  • Updated: 2015-08-16
  • Resolved: 2015-08-16
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 9
9Fixed
Description
As described by Doug Lea here:
 http://mail.openjdk.java.net/pipermail/jmm-dev/2015-August/000185.html

Basically, it amounts to add two new flavors for each CAS, plus the weak CAS hierarchy:

    boolean compareAndSet(Object owner, T cmp, T val);
    boolean compareAndSetAcquire(Object owner, T cmp, T val);
    boolean compareAndSetRelease(Object owner, T cmp, T val);

    boolean weakCompareAndSet(Object owner, T cmp, T val);
    boolean weakCompareAndSetAcquire(Object owner, T cmp, T val);
    boolean weakCompareAndSetRelease(Object owner, T cmp, T val); 
Comments
Pushed with: http://hg.openjdk.java.net/jdk9/sandbox/jdk/rev/1d160f6fc6b1 http://hg.openjdk.java.net/jdk9/sandbox/hotspot/rev/3518cfbc7d63
16-08-2015

Patches: http://cr.openjdk.java.net/~shade/8133451/webrev.hs.02/ http://cr.openjdk.java.net/~shade/8133451/webrev.jdk.02/ Pass JPRT, jcstress, ready to push.
13-08-2015