implement Unsafe.putOrderedLong and putVolatileLong

The former just defers to the latter for now, since it provides
strictly weaker guarantees.  Thus it's correct to use full
volatile-style barriers, though not as efficient as it could be on
some architectures.
This commit is contained in:
Joel Dice
2014-01-02 17:49:56 -07:00
parent ab4adef373
commit cc5b58725a
2 changed files with 40 additions and 0 deletions

View File

@ -50,6 +50,10 @@ public final class Unsafe {
public native long getLongVolatile(Object o, long offset);
public native long putLongVolatile(Object o, long offset, long x);
public native long putOrderedLong(Object o, long offset, long x);
public native void putOrderedInt(Object o, long offset, int x);
public native Object getObject(Object o, long offset);