Skip to content

Commit ef8d5e1

Browse files
Add missing urls for AtomicPtr
1 parent 1b38776 commit ef8d5e1

File tree

1 file changed

+37
-14
lines changed

1 file changed

+37
-14
lines changed

src/libcore/sync/atomic.rs

+37-14
Original file line numberDiff line numberDiff line change
@@ -619,11 +619,16 @@ impl<T> AtomicPtr<T> {
619619

620620
/// Loads a value from the pointer.
621621
///
622-
/// `load` takes an `Ordering` argument which describes the memory ordering of this operation.
622+
/// `load` takes an [`Ordering`] argument which describes the memory ordering
623+
/// of this operation.
623624
///
624625
/// # Panics
625626
///
626-
/// Panics if `order` is `Release` or `AcqRel`.
627+
/// Panics if `order` is [`Release`] or [`AcqRel`].
628+
///
629+
/// [`Ordering`]: enum.Ordering.html
630+
/// [`Release`]: enum.Ordering.html#variant.Release
631+
/// [`AcqRel`]: enum.Ordering.html#variant.AcqRel
627632
///
628633
/// # Examples
629634
///
@@ -643,7 +648,10 @@ impl<T> AtomicPtr<T> {
643648

644649
/// Stores a value into the pointer.
645650
///
646-
/// `store` takes an `Ordering` argument which describes the memory ordering of this operation.
651+
/// `store` takes an [`Ordering`] argument which describes the memory ordering
652+
/// of this operation.
653+
///
654+
/// [`Ordering`]: enum.Ordering.html
647655
///
648656
/// # Examples
649657
///
@@ -671,7 +679,10 @@ impl<T> AtomicPtr<T> {
671679

672680
/// Stores a value into the pointer, returning the old value.
673681
///
674-
/// `swap` takes an `Ordering` argument which describes the memory ordering of this operation.
682+
/// `swap` takes an [`Ordering`] argument which describes the memory ordering
683+
/// of this operation.
684+
///
685+
/// [`Ordering`]: enum.Ordering.html
675686
///
676687
/// # Examples
677688
///
@@ -696,8 +707,10 @@ impl<T> AtomicPtr<T> {
696707
/// The return value is always the previous value. If it is equal to `current`, then the value
697708
/// was updated.
698709
///
699-
/// `compare_and_swap` also takes an `Ordering` argument which describes the memory ordering of
700-
/// this operation.
710+
/// `compare_and_swap` also takes an [`Ordering`] argument which describes the memory
711+
/// ordering of this operation.
712+
///
713+
/// [`Ordering`]: enum.Ordering.html
701714
///
702715
/// # Examples
703716
///
@@ -726,10 +739,15 @@ impl<T> AtomicPtr<T> {
726739
/// The return value is a result indicating whether the new value was written and containing
727740
/// the previous value. On success this value is guaranteed to be equal to `current`.
728741
///
729-
/// `compare_exchange` takes two `Ordering` arguments to describe the memory ordering of this
730-
/// operation. The first describes the required ordering if the operation succeeds while the
731-
/// second describes the required ordering when the operation fails. The failure ordering can't
732-
/// be `Release` or `AcqRel` and must be equivalent or weaker than the success ordering.
742+
/// `compare_exchange` takes two [`Ordering`] arguments to describe the memory
743+
/// ordering of this operation. The first describes the required ordering if
744+
/// the operation succeeds while the second describes the required ordering when
745+
/// the operation fails. The failure ordering can't be [`Release`] or [`AcqRel`]
746+
/// and must be equivalent or weaker than the success ordering.
747+
///
748+
/// [`Ordering`]: enum.Ordering.html
749+
/// [`Release`]: enum.Ordering.html#variant.Release
750+
/// [`AcqRel`]: enum.Ordering.html#variant.AcqRel
733751
///
734752
/// # Examples
735753
///
@@ -768,16 +786,21 @@ impl<T> AtomicPtr<T> {
768786

769787
/// Stores a value into the pointer if the current value is the same as the `current` value.
770788
///
771-
/// Unlike `compare_exchange`, this function is allowed to spuriously fail even when the
789+
/// Unlike [`compare_exchange`], this function is allowed to spuriously fail even when the
772790
/// comparison succeeds, which can result in more efficient code on some platforms. The
773791
/// return value is a result indicating whether the new value was written and containing the
774792
/// previous value.
775793
///
776-
/// `compare_exchange_weak` takes two `Ordering` arguments to describe the memory
794+
/// `compare_exchange_weak` takes two [`Ordering`] arguments to describe the memory
777795
/// ordering of this operation. The first describes the required ordering if the operation
778796
/// succeeds while the second describes the required ordering when the operation fails. The
779-
/// failure ordering can't be `Release` or `AcqRel` and must be equivalent or weaker than the
780-
/// success ordering.
797+
/// failure ordering can't be [`Release`] or [`AcqRel`] and must be equivalent or
798+
/// weaker than the success ordering.
799+
///
800+
/// [`compare_exchange`]: #method.compare_exchange
801+
/// [`Ordering`]: enum.Ordering.html
802+
/// [`Release`]: enum.Ordering.html#variant.Release
803+
/// [`AcqRel`]: enum.Ordering.html#variant.AcqRel
781804
///
782805
/// # Examples
783806
///

0 commit comments

Comments
 (0)