8155965: Unsafe.weakCompareAndSetVolatile entry points and intrinsics
Reviewed-by: psandoz, vlivanov
This commit is contained in:
parent
3d8d9fe7fa
commit
85f537701c
@ -1271,6 +1271,13 @@ public final class Unsafe {
|
||||
return compareAndSwapObject(o, offset, expected, x);
|
||||
}
|
||||
|
||||
@HotSpotIntrinsicCandidate
|
||||
public final boolean weakCompareAndSwapObjectVolatile(Object o, long offset,
|
||||
Object expected,
|
||||
Object x) {
|
||||
return compareAndSwapObject(o, offset, expected, x);
|
||||
}
|
||||
|
||||
/**
|
||||
* Atomically updates Java variable to {@code x} if it is currently
|
||||
* holding {@code expected}.
|
||||
@ -1325,6 +1332,13 @@ public final class Unsafe {
|
||||
return compareAndSwapInt(o, offset, expected, x);
|
||||
}
|
||||
|
||||
@HotSpotIntrinsicCandidate
|
||||
public final boolean weakCompareAndSwapIntVolatile(Object o, long offset,
|
||||
int expected,
|
||||
int x) {
|
||||
return compareAndSwapInt(o, offset, expected, x);
|
||||
}
|
||||
|
||||
/**
|
||||
* Atomically updates Java variable to {@code x} if it is currently
|
||||
* holding {@code expected}.
|
||||
@ -1379,6 +1393,13 @@ public final class Unsafe {
|
||||
return compareAndSwapLong(o, offset, expected, x);
|
||||
}
|
||||
|
||||
@HotSpotIntrinsicCandidate
|
||||
public final boolean weakCompareAndSwapLongVolatile(Object o, long offset,
|
||||
long expected,
|
||||
long x) {
|
||||
return compareAndSwapLong(o, offset, expected, x);
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetches a reference value from a given Java variable, with volatile
|
||||
* load semantics. Otherwise identical to {@link #getObject(Object, long)}
|
||||
|
Loading…
Reference in New Issue
Block a user