@@ -332,15 +332,18 @@ impl AtomicBool {
332
332
/// Loads a value from the bool.
333
333
///
334
334
/// `load` takes an [`Ordering`] argument which describes the memory ordering
335
- /// of this operation.
335
+ /// of this operation. Possible values are [`SeqCst`], [`Acquire`] and [`Relaxed`].
336
336
///
337
337
/// # Panics
338
338
///
339
339
/// Panics if `order` is [`Release`] or [`AcqRel`].
340
340
///
341
341
/// [`Ordering`]: enum.Ordering.html
342
+ /// [`Relaxed`]: enum.Ordering.html#variant.Relaxed
342
343
/// [`Release`]: enum.Ordering.html#variant.Release
344
+ /// [`Acquire`]: enum.Ordering.html#variant.Acquire
343
345
/// [`AcqRel`]: enum.Ordering.html#variant.AcqRel
346
+ /// [`SeqCst`]: enum.Ordering.html#variant.SeqCst
344
347
///
345
348
/// # Examples
346
349
///
@@ -360,9 +363,18 @@ impl AtomicBool {
360
363
/// Stores a value into the bool.
361
364
///
362
365
/// `store` takes an [`Ordering`] argument which describes the memory ordering
363
- /// of this operation.
366
+ /// of this operation. Possible values are [`SeqCst`], [`Release`] and [`Relaxed`].
367
+ ///
368
+ /// # Panics
369
+ ///
370
+ /// Panics if `order` is [`Acquire`] or [`AcqRel`].
364
371
///
365
372
/// [`Ordering`]: enum.Ordering.html
373
+ /// [`Relaxed`]: enum.Ordering.html#variant.Relaxed
374
+ /// [`Release`]: enum.Ordering.html#variant.Release
375
+ /// [`Acquire`]: enum.Ordering.html#variant.Acquire
376
+ /// [`AcqRel`]: enum.Ordering.html#variant.AcqRel
377
+ /// [`SeqCst`]: enum.Ordering.html#variant.SeqCst
366
378
///
367
379
/// # Examples
368
380
///
@@ -374,13 +386,6 @@ impl AtomicBool {
374
386
/// some_bool.store(false, Ordering::Relaxed);
375
387
/// assert_eq!(some_bool.load(Ordering::Relaxed), false);
376
388
/// ```
377
- ///
378
- /// # Panics
379
- ///
380
- /// Panics if `order` is [`Acquire`] or [`AcqRel`].
381
- ///
382
- /// [`Acquire`]: enum.Ordering.html#variant.Acquire
383
- /// [`AcqRel`]: enum.Ordering.html#variant.AcqRel
384
389
#[ inline]
385
390
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
386
391
pub fn store ( & self , val : bool , order : Ordering ) {
@@ -751,15 +756,18 @@ impl<T> AtomicPtr<T> {
751
756
/// Loads a value from the pointer.
752
757
///
753
758
/// `load` takes an [`Ordering`] argument which describes the memory ordering
754
- /// of this operation.
759
+ /// of this operation. Possible values are [`SeqCst`], [`Acquire`] and [`Relaxed`].
755
760
///
756
761
/// # Panics
757
762
///
758
763
/// Panics if `order` is [`Release`] or [`AcqRel`].
759
764
///
760
765
/// [`Ordering`]: enum.Ordering.html
766
+ /// [`Relaxed`]: enum.Ordering.html#variant.Relaxed
761
767
/// [`Release`]: enum.Ordering.html#variant.Release
768
+ /// [`Acquire`]: enum.Ordering.html#variant.Acquire
762
769
/// [`AcqRel`]: enum.Ordering.html#variant.AcqRel
770
+ /// [`SeqCst`]: enum.Ordering.html#variant.SeqCst
763
771
///
764
772
/// # Examples
765
773
///
@@ -780,9 +788,18 @@ impl<T> AtomicPtr<T> {
780
788
/// Stores a value into the pointer.
781
789
///
782
790
/// `store` takes an [`Ordering`] argument which describes the memory ordering
783
- /// of this operation.
791
+ /// of this operation. Possible values are [`SeqCst`], [`Release`] and [`Relaxed`].
792
+ ///
793
+ /// # Panics
794
+ ///
795
+ /// Panics if `order` is [`Acquire`] or [`AcqRel`].
784
796
///
785
797
/// [`Ordering`]: enum.Ordering.html
798
+ /// [`Relaxed`]: enum.Ordering.html#variant.Relaxed
799
+ /// [`Release`]: enum.Ordering.html#variant.Release
800
+ /// [`Acquire`]: enum.Ordering.html#variant.Acquire
801
+ /// [`AcqRel`]: enum.Ordering.html#variant.AcqRel
802
+ /// [`SeqCst`]: enum.Ordering.html#variant.SeqCst
786
803
///
787
804
/// # Examples
788
805
///
@@ -796,13 +813,6 @@ impl<T> AtomicPtr<T> {
796
813
///
797
814
/// some_ptr.store(other_ptr, Ordering::Relaxed);
798
815
/// ```
799
- ///
800
- /// # Panics
801
- ///
802
- /// Panics if `order` is [`Acquire`] or [`AcqRel`].
803
- ///
804
- /// [`Acquire`]: enum.Ordering.html#variant.Acquire
805
- /// [`AcqRel`]: enum.Ordering.html#variant.AcqRel
806
816
#[ inline]
807
817
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
808
818
pub fn store ( & self , ptr : * mut T , order : Ordering ) {
@@ -1115,14 +1125,18 @@ assert_eq!(some_var.into_inner(), 5);
1115
1125
concat!( "Loads a value from the atomic integer.
1116
1126
1117
1127
`load` takes an [`Ordering`] argument which describes the memory ordering of this operation.
1128
+ Possible values are [`SeqCst`], [`Acquire`] and [`Relaxed`].
1118
1129
1119
1130
# Panics
1120
1131
1121
1132
Panics if `order` is [`Release`] or [`AcqRel`].
1122
1133
1123
1134
[`Ordering`]: enum.Ordering.html
1135
+ [`Relaxed`]: enum.Ordering.html#variant.Relaxed
1124
1136
[`Release`]: enum.Ordering.html#variant.Release
1137
+ [`Acquire`]: enum.Ordering.html#variant.Acquire
1125
1138
[`AcqRel`]: enum.Ordering.html#variant.AcqRel
1139
+ [`SeqCst`]: enum.Ordering.html#variant.SeqCst
1126
1140
1127
1141
# Examples
1128
1142
@@ -1144,8 +1158,18 @@ assert_eq!(some_var.load(Ordering::Relaxed), 5);
1144
1158
concat!( "Stores a value into the atomic integer.
1145
1159
1146
1160
`store` takes an [`Ordering`] argument which describes the memory ordering of this operation.
1161
+ Possible values are [`SeqCst`], [`Release`] and [`Relaxed`].
1162
+
1163
+ # Panics
1164
+
1165
+ Panics if `order` is [`Acquire`] or [`AcqRel`].
1147
1166
1148
1167
[`Ordering`]: enum.Ordering.html
1168
+ [`Relaxed`]: enum.Ordering.html#variant.Relaxed
1169
+ [`Release`]: enum.Ordering.html#variant.Release
1170
+ [`Acquire`]: enum.Ordering.html#variant.Acquire
1171
+ [`AcqRel`]: enum.Ordering.html#variant.AcqRel
1172
+ [`SeqCst`]: enum.Ordering.html#variant.SeqCst
1149
1173
1150
1174
# Examples
1151
1175
@@ -1156,14 +1180,7 @@ let some_var = ", stringify!($atomic_type), "::new(5);
1156
1180
1157
1181
some_var.store(10, Ordering::Relaxed);
1158
1182
assert_eq!(some_var.load(Ordering::Relaxed), 10);
1159
- ```
1160
-
1161
- # Panics
1162
-
1163
- Panics if `order` is [`Acquire`] or [`AcqRel`].
1164
-
1165
- [`Acquire`]: enum.Ordering.html#variant.Acquire
1166
- [`AcqRel`]: enum.Ordering.html#variant.AcqRel" ) ,
1183
+ ```" ) ,
1167
1184
#[ inline]
1168
1185
#[ $stable]
1169
1186
pub fn store( & self , val: $int_type, order: Ordering ) {
0 commit comments