8252529: Unsafe Documentation around Barrier Methods Inaccurate
Reviewed-by: psandoz
This commit is contained in:
parent
b3e264187a
commit
de49337060
@ -3412,9 +3412,8 @@ public final class Unsafe {
|
|||||||
* Corresponds to C11 atomic_thread_fence(memory_order_acquire)
|
* Corresponds to C11 atomic_thread_fence(memory_order_acquire)
|
||||||
* (an "acquire fence").
|
* (an "acquire fence").
|
||||||
*
|
*
|
||||||
* A pure LoadLoad fence is not provided, since the addition of LoadStore
|
* Provides a LoadLoad barrier followed by a LoadStore barrier.
|
||||||
* is almost always desired, and most current hardware instructions that
|
*
|
||||||
* provide a LoadLoad barrier also provide a LoadStore barrier for free.
|
|
||||||
* @since 1.8
|
* @since 1.8
|
||||||
*/
|
*/
|
||||||
@HotSpotIntrinsicCandidate
|
@HotSpotIntrinsicCandidate
|
||||||
@ -3427,9 +3426,9 @@ public final class Unsafe {
|
|||||||
* Corresponds to C11 atomic_thread_fence(memory_order_release)
|
* Corresponds to C11 atomic_thread_fence(memory_order_release)
|
||||||
* (a "release fence").
|
* (a "release fence").
|
||||||
*
|
*
|
||||||
* A pure StoreStore fence is not provided, since the addition of LoadStore
|
* Provides a StoreStore barrier followed by a LoadStore barrier.
|
||||||
* is almost always desired, and most current hardware instructions that
|
*
|
||||||
* provide a StoreStore barrier also provide a LoadStore barrier for free.
|
*
|
||||||
* @since 1.8
|
* @since 1.8
|
||||||
*/
|
*/
|
||||||
@HotSpotIntrinsicCandidate
|
@HotSpotIntrinsicCandidate
|
||||||
@ -3450,6 +3449,11 @@ public final class Unsafe {
|
|||||||
/**
|
/**
|
||||||
* Ensures that loads before the fence will not be reordered with
|
* Ensures that loads before the fence will not be reordered with
|
||||||
* loads after the fence.
|
* loads after the fence.
|
||||||
|
*
|
||||||
|
* @implNote
|
||||||
|
* This method is operationally equivalent to {@link #loadFence()}.
|
||||||
|
*
|
||||||
|
* @since 9
|
||||||
*/
|
*/
|
||||||
public final void loadLoadFence() {
|
public final void loadLoadFence() {
|
||||||
loadFence();
|
loadFence();
|
||||||
@ -3458,6 +3462,11 @@ public final class Unsafe {
|
|||||||
/**
|
/**
|
||||||
* Ensures that stores before the fence will not be reordered with
|
* Ensures that stores before the fence will not be reordered with
|
||||||
* stores after the fence.
|
* stores after the fence.
|
||||||
|
*
|
||||||
|
* @implNote
|
||||||
|
* This method is operationally equivalent to {@link #storeFence()}.
|
||||||
|
*
|
||||||
|
* @since 9
|
||||||
*/
|
*/
|
||||||
public final void storeStoreFence() {
|
public final void storeStoreFence() {
|
||||||
storeFence();
|
storeFence();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user