@@ -955,6 +955,14 @@ impl AtomicBool {
955
955
/// **Note:** This method is only available on platforms that support atomic
956
956
/// operations on `u8`.
957
957
///
958
+ /// # Considerations
959
+ ///
960
+ /// This method is not magic; it is not provided by the hardware.
961
+ /// It is implemented in terms of [`AtomicBool::compare_exchange_weak`], and suffers from the same drawbacks.
962
+ /// In particular, this method will not circumvent the [ABA Problem].
963
+ ///
964
+ /// [ABA Problem]: https://en.wikipedia.org/wiki/ABA_problem
965
+ ///
958
966
/// # Examples
959
967
///
960
968
/// ```rust
@@ -1422,6 +1430,14 @@ impl<T> AtomicPtr<T> {
1422
1430
/// **Note:** This method is only available on platforms that support atomic
1423
1431
/// operations on pointers.
1424
1432
///
1433
+ /// # Considerations
1434
+ ///
1435
+ /// This method is not magic; it is not provided by the hardware.
1436
+ /// It is implemented in terms of [`AtomicPtr::compare_exchange_weak`], and suffers from the same drawbacks.
1437
+ /// In particular, this method will not circumvent the [ABA Problem].
1438
+ ///
1439
+ /// [ABA Problem]: https://en.wikipedia.org/wiki/ABA_problem
1440
+ ///
1425
1441
/// # Examples
1426
1442
///
1427
1443
/// ```rust
@@ -2510,6 +2526,16 @@ macro_rules! atomic_int {
2510
2526
/// **Note**: This method is only available on platforms that support atomic operations on
2511
2527
#[ doc = concat!( "[`" , $s_int_type, "`]." ) ]
2512
2528
///
2529
+ /// # Considerations
2530
+ ///
2531
+ /// This method is not magic; it is not provided by the hardware.
2532
+ /// It is implemented in terms of
2533
+ #[ doc = concat!( "[`" , stringify!( $atomic_type) , "::compare_exchange_weak`]," ) ]
2534
+ /// and suffers from the same drawbacks.
2535
+ /// In particular, this method will not circumvent the [ABA Problem].
2536
+ ///
2537
+ /// [ABA Problem]: https://en.wikipedia.org/wiki/ABA_problem
2538
+ ///
2513
2539
/// # Examples
2514
2540
///
2515
2541
/// ```rust
0 commit comments