8004318: JEP-171: Support Unsafe fences intrinsics

Add three memory-ordering intrinsics to the sun.misc.Unsafe class.

Reviewed-by: twisti, kvn
This commit is contained in:
Aleksey Shipilev 2012-12-18 17:47:50 -08:00 committed by Vladimir Kozlov
parent d25f3ac7fb
commit f39122797e

View File

@ -1008,4 +1008,23 @@ public final class Unsafe {
* if the load average is unobtainable.
*/
public native int getLoadAverage(double[] loadavg, int nelems);
/**
* Ensures lack of reordering of loads before the fence
* with loads or stores after the fence.
*/
public native void loadFence();
/**
* Ensures lack of reordering of stores before the fence
* with loads or stores after the fence.
*/
public native void storeFence();
/**
* Ensures lack of reordering of loads or stores before the fence
* with loads or stores after the fence.
*/
public native void fullFence();
}