@@ -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.
@@ -1116,9 +1118,10 @@ impl<T> AtomicPtr<T> {
1116
1118
/// the previous value. On success this value is guaranteed to be equal to `current`.
1117
1119
///
1118
1120
/// `compare_exchange` takes two [`Ordering`] arguments to describe the memory
1119
- /// ordering of this operation. The first describes the required ordering if the
1120
- /// operation succeeds while the second describes the required ordering when the
1121
- /// operation fails. Using [`Acquire`] as success ordering makes the store part
1121
+ /// ordering of this operation. `success` describes the required ordering for the
1122
+ /// read-modify-write operation that takes place if the comparison with `current` succeeds.
1123
+ /// `failure` describes the required ordering for the load operation that takes place when
1124
+ /// the comparison fails. Using [`Acquire`] as success ordering makes the store part
1122
1125
/// of this operation [`Relaxed`], and using [`Release`] makes the successful load
1123
1126
/// [`Relaxed`]. The failure ordering can only be [`SeqCst`], [`Acquire`] or [`Relaxed`]
1124
1127
/// and must be equivalent to or weaker than the success ordering.
@@ -1173,9 +1176,10 @@ impl<T> AtomicPtr<T> {
1173
1176
/// previous value.
1174
1177
///
1175
1178
/// `compare_exchange_weak` takes two [`Ordering`] arguments to describe the memory
1176
- /// ordering of this operation. The first describes the required ordering if the
1177
- /// operation succeeds while the second describes the required ordering when the
1178
- /// operation fails. Using [`Acquire`] as success ordering makes the store part
1179
+ /// ordering of this operation. `success` describes the required ordering for the
1180
+ /// read-modify-write operation that takes place if the comparison with `current` succeeds.
1181
+ /// `failure` describes the required ordering for the load operation that takes place when
1182
+ /// the comparison fails. Using [`Acquire`] as success ordering makes the store part
1179
1183
/// of this operation [`Relaxed`], and using [`Release`] makes the successful load
1180
1184
/// [`Relaxed`]. The failure ordering can only be [`SeqCst`], [`Acquire`] or [`Relaxed`]
1181
1185
/// and must be equivalent to or weaker than the success ordering.
@@ -1671,9 +1675,10 @@ containing the previous value. On success this value is guaranteed to be equal t
1671
1675
`current`.
1672
1676
1673
1677
`compare_exchange` takes two [`Ordering`] arguments to describe the memory
1674
- ordering of this operation. The first describes the required ordering if the
1675
- operation succeeds while the second describes the required ordering when the
1676
- operation fails. Using [`Acquire`] as success ordering makes the store part
1678
+ ordering of this operation. `success` describes the required ordering for the
1679
+ read-modify-write operation that takes place if the comparison with `current` succeeds.
1680
+ `failure` describes the required ordering for the load operation that takes place when
1681
+ the comparison fails. Using [`Acquire`] as success ordering makes the store part
1677
1682
of this operation [`Relaxed`], and using [`Release`] makes the successful load
1678
1683
[`Relaxed`]. The failure ordering can only be [`SeqCst`], [`Acquire`] or [`Relaxed`]
1679
1684
and must be equivalent to or weaker than the success ordering.
@@ -1723,9 +1728,10 @@ platforms. The return value is a result indicating whether the new value was
1723
1728
written and containing the previous value.
1724
1729
1725
1730
`compare_exchange_weak` takes two [`Ordering`] arguments to describe the memory
1726
- ordering of this operation. The first describes the required ordering if the
1727
- operation succeeds while the second describes the required ordering when the
1728
- operation fails. Using [`Acquire`] as success ordering makes the store part
1731
+ ordering of this operation. `success` describes the required ordering for the
1732
+ read-modify-write operation that takes place if the comparison with `current` succeeds.
1733
+ `failure` describes the required ordering for the load operation that takes place when
1734
+ the comparison fails. Using [`Acquire`] as success ordering makes the store part
1729
1735
of this operation [`Relaxed`], and using [`Release`] makes the successful load
1730
1736
[`Relaxed`]. The failure ordering can only be [`SeqCst`], [`Acquire`] or [`Relaxed`]
1731
1737
and must be equivalent to or weaker than the success ordering.
0 commit comments