Skip to content

Commit c41256c

Browse files
authored
Rollup merge of rust-lang#38674 - GuillaumeGomez:atomic_fn_docs, r=frewsxcv
Add missing urls for atomic fn docs r? @frewsxcv
2 parents 1b4acae + c8e7b76 commit c41256c

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed

src/libcore/sync/atomic.rs

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1495,24 +1495,31 @@ unsafe fn atomic_xor<T>(dst: *mut T, val: T, order: Ordering) -> T {
14951495

14961496
/// An atomic fence.
14971497
///
1498-
/// A fence 'A' which has `Release` ordering semantics, synchronizes with a
1499-
/// fence 'B' with (at least) `Acquire` semantics, if and only if there exists
1498+
/// A fence 'A' which has [`Release`] ordering semantics, synchronizes with a
1499+
/// fence 'B' with (at least) [`Acquire`] semantics, if and only if there exists
15001500
/// atomic operations X and Y, both operating on some atomic object 'M' such
15011501
/// that A is sequenced before X, Y is synchronized before B and Y observes
15021502
/// the change to M. This provides a happens-before dependence between A and B.
15031503
///
1504-
/// Atomic operations with `Release` or `Acquire` semantics can also synchronize
1504+
/// Atomic operations with [`Release`] or [`Acquire`] semantics can also synchronize
15051505
/// with a fence.
15061506
///
1507-
/// A fence which has `SeqCst` ordering, in addition to having both `Acquire`
1508-
/// and `Release` semantics, participates in the global program order of the
1509-
/// other `SeqCst` operations and/or fences.
1507+
/// A fence which has [`SeqCst`] ordering, in addition to having both [`Acquire`]
1508+
/// and [`Release`] semantics, participates in the global program order of the
1509+
/// other [`SeqCst`] operations and/or fences.
15101510
///
1511-
/// Accepts `Acquire`, `Release`, `AcqRel` and `SeqCst` orderings.
1511+
/// Accepts [`Acquire`], [`Release`], [`AcqRel`] and [`SeqCst`] orderings.
15121512
///
15131513
/// # Panics
15141514
///
1515-
/// Panics if `order` is `Relaxed`.
1515+
/// Panics if `order` is [`Relaxed`].
1516+
///
1517+
/// [`Ordering`]: enum.Ordering.html
1518+
/// [`Acquire`]: enum.Ordering.html#variant.Acquire
1519+
/// [`SeqCst`]: enum.Ordering.html#variant.SeqCst
1520+
/// [`Release`]: enum.Ordering.html#variant.Release
1521+
/// [`AcqRel`]: enum.Ordering.html#variant.AcqRel
1522+
/// [`Relaxed`]: enum.Ordering.html#variant.Relaxed
15161523
#[inline]
15171524
#[stable(feature = "rust1", since = "1.0.0")]
15181525
pub fn fence(order: Ordering) {

0 commit comments

Comments
 (0)