@@ -514,9 +514,10 @@ impl AtomicBool {
514
514
/// the previous value. On success this value is guaranteed to be equal to `current`.
515
515
///
516
516
/// `compare_exchange` takes two [`Ordering`] arguments to describe the memory
517
- /// ordering of this operation. The first describes the required ordering if the
518
- /// operation succeeds while the second describes the required ordering when the
519
- /// operation fails. Using [`Acquire`] as success ordering makes the store part
517
+ /// ordering of this operation. `success` describes the required ordering for the
518
+ /// read-modify-write operation that takes place if the comparison with `current` succeeds.
519
+ /// `failure` describes the required ordering for the load operation that takes place when
520
+ /// the comparison fails. Using [`Acquire`] as success ordering makes the store part
520
521
/// of this operation [`Relaxed`], and using [`Release`] makes the successful load
521
522
/// [`Relaxed`]. The failure ordering can only be [`SeqCst`], [`Acquire`] or [`Relaxed`]
522
523
/// and must be equivalent to or weaker than the success ordering.
@@ -572,9 +573,10 @@ impl AtomicBool {
572
573
/// previous value.
573
574
///
574
575
/// `compare_exchange_weak` takes two [`Ordering`] arguments to describe the memory
575
- /// ordering of this operation. The first describes the required ordering if the
576
- /// operation succeeds while the second describes the required ordering when the
577
- /// operation fails. Using [`Acquire`] as success ordering makes the store part
576
+ /// ordering of this operation. `success` describes the required ordering for the
577
+ /// read-modify-write operation that takes place if the comparison with `current` succeeds.
578
+ /// `failure` describes the required ordering for the load operation that takes place when
579
+ /// the comparison fails. Using [`Acquire`] as success ordering makes the store part
578
580
/// of this operation [`Relaxed`], and using [`Release`] makes the successful load
579
581
/// [`Relaxed`]. The failure ordering can only be [`SeqCst`], [`Acquire`] or [`Relaxed`]
580
582
/// and must be equivalent to or weaker than the success ordering.
@@ -1138,9 +1140,10 @@ impl<T> AtomicPtr<T> {
1138
1140
/// the previous value. On success this value is guaranteed to be equal to `current`.
1139
1141
///
1140
1142
/// `compare_exchange` takes two [`Ordering`] arguments to describe the memory
1141
- /// ordering of this operation. The first describes the required ordering if the
1142
- /// operation succeeds while the second describes the required ordering when the
1143
- /// operation fails. Using [`Acquire`] as success ordering makes the store part
1143
+ /// ordering of this operation. `success` describes the required ordering for the
1144
+ /// read-modify-write operation that takes place if the comparison with `current` succeeds.
1145
+ /// `failure` describes the required ordering for the load operation that takes place when
1146
+ /// the comparison fails. Using [`Acquire`] as success ordering makes the store part
1144
1147
/// of this operation [`Relaxed`], and using [`Release`] makes the successful load
1145
1148
/// [`Relaxed`]. The failure ordering can only be [`SeqCst`], [`Acquire`] or [`Relaxed`]
1146
1149
/// and must be equivalent to or weaker than the success ordering.
@@ -1201,9 +1204,10 @@ impl<T> AtomicPtr<T> {
1201
1204
/// previous value.
1202
1205
///
1203
1206
/// `compare_exchange_weak` takes two [`Ordering`] arguments to describe the memory
1204
- /// ordering of this operation. The first describes the required ordering if the
1205
- /// operation succeeds while the second describes the required ordering when the
1206
- /// operation fails. Using [`Acquire`] as success ordering makes the store part
1207
+ /// ordering of this operation. `success` describes the required ordering for the
1208
+ /// read-modify-write operation that takes place if the comparison with `current` succeeds.
1209
+ /// `failure` describes the required ordering for the load operation that takes place when
1210
+ /// the comparison fails. Using [`Acquire`] as success ordering makes the store part
1207
1211
/// of this operation [`Relaxed`], and using [`Release`] makes the successful load
1208
1212
/// [`Relaxed`]. The failure ordering can only be [`SeqCst`], [`Acquire`] or [`Relaxed`]
1209
1213
/// and must be equivalent to or weaker than the success ordering.
@@ -1708,9 +1712,10 @@ containing the previous value. On success this value is guaranteed to be equal t
1708
1712
`current`.
1709
1713
1710
1714
`compare_exchange` takes two [`Ordering`] arguments to describe the memory
1711
- ordering of this operation. The first describes the required ordering if the
1712
- operation succeeds while the second describes the required ordering when the
1713
- operation fails. Using [`Acquire`] as success ordering makes the store part
1715
+ ordering of this operation. `success` describes the required ordering for the
1716
+ read-modify-write operation that takes place if the comparison with `current` succeeds.
1717
+ `failure` describes the required ordering for the load operation that takes place when
1718
+ the comparison fails. Using [`Acquire`] as success ordering makes the store part
1714
1719
of this operation [`Relaxed`], and using [`Release`] makes the successful load
1715
1720
[`Relaxed`]. The failure ordering can only be [`SeqCst`], [`Acquire`] or [`Relaxed`]
1716
1721
and must be equivalent to or weaker than the success ordering.
@@ -1760,9 +1765,10 @@ platforms. The return value is a result indicating whether the new value was
1760
1765
written and containing the previous value.
1761
1766
1762
1767
`compare_exchange_weak` takes two [`Ordering`] arguments to describe the memory
1763
- ordering of this operation. The first describes the required ordering if the
1764
- operation succeeds while the second describes the required ordering when the
1765
- operation fails. Using [`Acquire`] as success ordering makes the store part
1768
+ ordering of this operation. `success` describes the required ordering for the
1769
+ read-modify-write operation that takes place if the comparison with `current` succeeds.
1770
+ `failure` describes the required ordering for the load operation that takes place when
1771
+ the comparison fails. Using [`Acquire`] as success ordering makes the store part
1766
1772
of this operation [`Relaxed`], and using [`Release`] makes the successful load
1767
1773
[`Relaxed`]. The failure ordering can only be [`SeqCst`], [`Acquire`] or [`Relaxed`]
1768
1774
and must be equivalent to or weaker than the success ordering.
0 commit comments