mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8276096: Simplify Unsafe.{load|store}Fence fallbacks by delegating to fullFence
Reviewed-by: psandoz, aph, dholmes
This commit is contained in:
parent
558ee40a4a
commit
fb0be81f01
3 changed files with 10 additions and 15 deletions
|
@ -3395,7 +3395,10 @@ public final class Unsafe {
|
|||
* @since 1.8
|
||||
*/
|
||||
@IntrinsicCandidate
|
||||
public native void loadFence();
|
||||
public final void loadFence() {
|
||||
// If loadFence intrinsic is not available, fall back to full fence.
|
||||
fullFence();
|
||||
}
|
||||
|
||||
/**
|
||||
* Ensures that loads and stores before the fence will not be reordered with
|
||||
|
@ -3406,11 +3409,13 @@ public final class Unsafe {
|
|||
*
|
||||
* Provides a StoreStore barrier followed by a LoadStore barrier.
|
||||
*
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
@IntrinsicCandidate
|
||||
public native void storeFence();
|
||||
public final void storeFence() {
|
||||
// If storeFence intrinsic is not available, fall back to full fence.
|
||||
fullFence();
|
||||
}
|
||||
|
||||
/**
|
||||
* Ensures that loads and stores before the fence will not be reordered
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue