Skip to content

Commit

Permalink
documentation for AtomicPtr CAS operations
Browse files Browse the repository at this point in the history
  • Loading branch information
Arno Haase committed Sep 10, 2019
1 parent 61dced1 commit 7ad44c7
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/libcore/sync/atomic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -979,9 +979,8 @@ impl<T> AtomicPtr<T> {
/// let some_ptr = AtomicPtr::new(ptr);
///
/// 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]
#[stable(feature = "rust1", since = "1.0.0")]
Expand Down Expand Up @@ -1021,9 +1020,8 @@ impl<T> AtomicPtr<T> {
/// let some_ptr = AtomicPtr::new(ptr);
///
/// 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);
/// ```
#[inline]
Expand Down

0 comments on commit 7ad44c7

Please sign in to comment.