JDK-8157726 : VarHandles/Unsafe should support sub-word atomic ops
  • Type: Sub-task
  • Component: core-libs
  • Sub-Component: java.lang.invoke
  • Affected Version: 9
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2016-05-24
  • Updated: 2019-01-23
  • Resolved: 2016-06-15
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
9 b127Fixed
Related Reports
Blocks :  
Duplicate :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
See the discussion here:
  http://mail.openjdk.java.net/pipermail/core-libs-dev/2016-May/041369.html
  http://mail.openjdk.java.net/pipermail/core-libs-dev/2016-May/041382.html

This needs new entry points in Unsafe, compiler support and intrinsics. Also, a sensible fallback strategy for platforms lacking sub-word atomic ops.
Comments
Rebased: http://cr.openjdk.java.net/~shade/8157726/webrev.hs.04/ http://cr.openjdk.java.net/~shade/8157726/webrev.jdk.04/
09-06-2016

CCC approved
01-06-2016

RFR: http://mail.openjdk.java.net/pipermail/jdk9-dev/2016-May/004365.html
27-05-2016

+ x86_32 intrinsics: http://cr.openjdk.java.net/~shade/8157726/webrev.hs.03/ http://cr.openjdk.java.net/~shade/8157726/webrev.jdk.03/
26-05-2016

+ test updates for byte order, + tests pass on big-endian platforms, + spec update, + cleanups: http://cr.openjdk.java.net/~shade/8157726/webrev.hs.02/ http://cr.openjdk.java.net/~shade/8157726/webrev.jdk.02/
26-05-2016

+ VarHandles bindings: http://cr.openjdk.java.net/~shade/8157726/webrev.hs.01/ http://cr.openjdk.java.net/~shade/8157726/webrev.jdk.01/
25-05-2016

Preliminary webrevs (Unsafe support for {byte,short} x {CAS, weakCAS, CAE, getAndAdd, getAndSet} + their x86_64 intrinsics): http://cr.openjdk.java.net/~shade/8157726/webrev.hs.00/ http://cr.openjdk.java.net/~shade/8157726/webrev.jdk.00/
24-05-2016