Skip to content

Commit 110bcc9

Browse files
committed
forgot to add comment for some atomic types
1 parent e9a86a2 commit 110bcc9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/libcore/sync/atomic.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -843,7 +843,8 @@ impl<T> AtomicPtr<T> {
843843
/// was updated.
844844
///
845845
/// `compare_and_swap` also takes an [`Ordering`] argument which describes the memory
846-
/// ordering of this operation.
846+
/// ordering of this operation. Notice that even when using [`AcqRel`], the operation
847+
/// might fail and hence just perform an `Acquire` load, but not have `Release` semantics.
847848
///
848849
/// [`Ordering`]: enum.Ordering.html
849850
///
@@ -1202,7 +1203,8 @@ The return value is always the previous value. If it is equal to `current`, then
12021203
value was updated.
12031204
12041205
`compare_and_swap` also takes an [`Ordering`] argument which describes the memory
1205-
ordering of this operation.
1206+
ordering of this operation. Notice that even when using [`AcqRel`], the operation
1207+
might fail and hence just perform an `Acquire` load, but not have `Release` semantics.
12061208
12071209
[`Ordering`]: enum.Ordering.html
12081210

0 commit comments

Comments
 (0)