提交 70812ef7 编写于 作者: K kvn

8004318: JEP-171: Support Unsafe fences intrinsics

Summary: Add three memory-ordering intrinsics to the sun.misc.Unsafe class.
Reviewed-by: twisti, kvn
Contributed-by: NAleksey Shipilev <aleksey.shipilev@oracle.com>
上级 19d27bc8
...@@ -1008,4 +1008,23 @@ public final class Unsafe { ...@@ -1008,4 +1008,23 @@ public final class Unsafe {
* if the load average is unobtainable. * if the load average is unobtainable.
*/ */
public native int getLoadAverage(double[] loadavg, int nelems); 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();
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册