Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing urls for atomic_int macros types #38649

Merged
merged 1 commit into from
Dec 30, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 36 additions & 17 deletions src/libcore/sync/atomic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -913,12 +913,16 @@ macro_rules! atomic_int {

/// Loads a value from the atomic integer.
///
/// `load` takes an `Ordering` argument which describes the memory ordering of this
/// `load` takes an [`Ordering`] argument which describes the memory ordering of this
/// operation.
///
/// # Panics
///
/// Panics if `order` is `Release` or `AcqRel`.
/// Panics if `order` is [`Release`] or [`AcqRel`].
///
/// [`Ordering`]: enum.Ordering.html
/// [`Release`]: enum.Ordering.html#variant.Release
/// [`AcqRel`]: enum.Ordering.html#variant.AcqRel
///
/// # Examples
///
Expand All @@ -937,9 +941,11 @@ macro_rules! atomic_int {

/// Stores a value into the atomic integer.
///
/// `store` takes an `Ordering` argument which describes the memory ordering of this
/// `store` takes an [`Ordering`] argument which describes the memory ordering of this
/// operation.
///
/// [`Ordering`]: enum.Ordering.html
///
/// # Examples
///
/// ```
Expand All @@ -962,9 +968,11 @@ macro_rules! atomic_int {

/// Stores a value into the atomic integer, returning the old value.
///
/// `swap` takes an `Ordering` argument which describes the memory ordering of this
/// `swap` takes an [`Ordering`] argument which describes the memory ordering of this
/// operation.
///
/// [`Ordering`]: enum.Ordering.html
///
/// # Examples
///
/// ```
Expand All @@ -986,9 +994,11 @@ macro_rules! atomic_int {
/// The return value is always the previous value. If it is equal to `current`, then the
/// value was updated.
///
/// `compare_and_swap` also takes an `Ordering` argument which describes the memory
/// `compare_and_swap` also takes an [`Ordering`] argument which describes the memory
/// ordering of this operation.
///
/// [`Ordering`]: enum.Ordering.html
///
/// # Examples
///
/// ```
Expand Down Expand Up @@ -1024,11 +1034,15 @@ macro_rules! atomic_int {
/// containing the previous value. On success this value is guaranteed to be equal to
/// `current`.
///
/// `compare_exchange` takes two `Ordering` arguments to describe the memory ordering of
/// this operation. The first describes the required ordering if the operation succeeds
/// while the second describes the required ordering when the operation fails. The
/// failure ordering can't be `Release` or `AcqRel` and must be equivalent or weaker
/// than the success ordering.
/// `compare_exchange` takes two [`Ordering`] arguments to describe the memory
/// ordering of this operation. The first describes the required ordering if
/// the operation succeeds while the second describes the required ordering when
/// the operation fails. The failure ordering can't be [`Release`] or [`AcqRel`] and
/// must be equivalent or weaker than the success ordering.
///
/// [`Ordering`]: enum.Ordering.html
/// [`Release`]: enum.Ordering.html#variant.Release
/// [`AcqRel`]: enum.Ordering.html#variant.AcqRel
///
/// # Examples
///
Expand Down Expand Up @@ -1062,16 +1076,21 @@ macro_rules! atomic_int {
/// Stores a value into the atomic integer if the current value is the same as the
/// `current` value.
///
/// Unlike `compare_exchange`, this function is allowed to spuriously fail even when the
/// comparison succeeds, which can result in more efficient code on some platforms. The
/// return value is a result indicating whether the new value was written and containing
/// the previous value.
/// Unlike [`compare_exchange`], this function is allowed to spuriously fail even
/// when the comparison succeeds, which can result in more efficient code on some
/// platforms. The return value is a result indicating whether the new value was
/// written and containing the previous value.
///
/// `compare_exchange_weak` takes two `Ordering` arguments to describe the memory
/// `compare_exchange_weak` takes two [`Ordering`] arguments to describe the memory
/// ordering of this operation. The first describes the required ordering if the
/// operation succeeds while the second describes the required ordering when the
/// operation fails. The failure ordering can't be `Release` or `AcqRel` and must be
/// equivalent or weaker than the success ordering.
/// operation fails. The failure ordering can't be [`Release`] or [`AcqRel`] and
/// must be equivalent or weaker than the success ordering.
///
/// [`compare_exchange`]: #method.compare_exchange
/// [`Ordering`]: enum.Ordering.html
/// [`Release`]: enum.Ordering.html#variant.Release
/// [`AcqRel`]: enum.Ordering.html#variant.AcqRel
///
/// # Examples
///
Expand Down