[concurrency-interest] RFR: 8065804: JEP 171:	Clarifications/corrections for fence intrinsics
    Paul Sandoz 
    paul.sandoz at oracle.com
       
    Tue Dec  2 10:41:31 UTC 2014
    
    
  
On Dec 2, 2014, at 1:58 AM, Doug Lea <dl at cs.oswego.edu> wrote:
> On 12/01/2014 03:46 PM, Martin Buchholz wrote:
>> David, Paul (i.e. Reviewers) and Doug,
>> 
>> I'd like to commit corrections so we make progress.
> 
> The current one looks OK to me.
> (http://cr.openjdk.java.net/~martin/webrevs/openjdk9/fence-intrinsics/)
> 
Same here, looks ok.
I anticipate we will be revisiting this area with the enhanced volatiles [1] work and related JMM updates, where there will be a public API for low-level enhanced field/array access [2].
As you rightly observed Unsafe does not currently have a get/read-acquire method. Implementations of [2] currently emulate that with a relaxed read + Unsafe.loadFence. It's something we need to add.
Paul.
[1] http://openjdk.java.net/jeps/193
[2] http://hg.openjdk.java.net/valhalla/valhalla/jdk/file/2d4531473a89/src/java.base/share/classes/java/lang/invoke/VarHandle.java
    
    
More information about the core-libs-dev
mailing list