documentation for AtomicPtr CAS operations

This commit is contained in:
Arno Haase 2019-09-10 14:18:16 +02:00
parent 61dced1827
commit 7ad44c7c9c

View file

@ -979,9 +979,8 @@ impl<T> AtomicPtr<T> {
/// let some_ptr = AtomicPtr::new(ptr); /// let some_ptr = AtomicPtr::new(ptr);
/// ///
/// let other_ptr = &mut 10; /// let other_ptr = &mut 10;
/// let another_ptr = &mut 10;
/// ///
/// let value = some_ptr.compare_and_swap(other_ptr, another_ptr, Ordering::Relaxed); /// let value = some_ptr.compare_and_swap(ptr, other_ptr, Ordering::Relaxed);
/// ``` /// ```
#[inline] #[inline]
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
@ -1021,9 +1020,8 @@ impl<T> AtomicPtr<T> {
/// let some_ptr = AtomicPtr::new(ptr); /// let some_ptr = AtomicPtr::new(ptr);
/// ///
/// let other_ptr = &mut 10; /// let other_ptr = &mut 10;
/// let another_ptr = &mut 10;
/// ///
/// let value = some_ptr.compare_exchange(other_ptr, another_ptr, /// let value = some_ptr.compare_exchange(ptr, other_ptr,
/// Ordering::SeqCst, Ordering::Relaxed); /// Ordering::SeqCst, Ordering::Relaxed);
/// ``` /// ```
#[inline] #[inline]