jdk.internal.misc.Unsafe.weakCompareAndSwapObject

Andrew Haley aph at redhat.com
Wed Feb 24 17:33:40 UTC 2016


On 02/24/2016 05:29 PM, Andrew Haley wrote:
> What are the semantics of Unsafe.weakCompareAndSwapObject?
> These methods seem to be undocumented.
> 
> Here's my guess:
> 
> compareAndSwapObject : acquire, release
> weakCompareAndSwapObject: nothing
> weakCompareAndSwapObjectAcquire: acquire
> weakCompareAndSwapObjectRelease: release

...but not all of these seem to have C2 graph nodes.  I can only see
WeakCompareAndSwapX and CompareAndExchangeX.

I'm guessing that WeakCompareAndSwapX corresponds to no acquire
and no release; CompareAndExchangeX is an acquire and a release.

Andrew.



More information about the hotspot-dev mailing list