JEP 171: Fence Intrinsics
Doug Lea
dl at cs.oswego.edu
Mon Dec 3 09:54:11 PST 2012
On 12/03/12 12:45, David Chase wrote:
> Is this the right place to comment on this? I think these should not go in
> Unsafe; fence intrinsics belong with compareAndSet in j.u.concurrent.atomic.
They cannot. The methods cannot be spec'ed using only the concepts
in the JLS/JMM. So they are not "Java methods", but "JVM methods".
(This is the same rationale for placing @Contended in sun.misc.)
Someday, a serious effort is needed to enable rigorous specs
of core intrinsics along these lines (possible even with a
Java-level JMM memory model overhaul). But I don't think anyone
wants to hold these methods hostage for years until this happens.
-Doug
More information about the hotspot-dev
mailing list