From 9d8506d27faf8b396dd54c361182269d265d5d98 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sun, 15 Oct 2023 17:41:38 +0200 Subject: [PATCH] acquire loads can be done as relaxed load; acquire fence --- library/core/src/sync/atomic.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/library/core/src/sync/atomic.rs b/library/core/src/sync/atomic.rs index 53a57412f82..aa8ca1e025f 100644 --- a/library/core/src/sync/atomic.rs +++ b/library/core/src/sync/atomic.rs @@ -112,6 +112,9 @@ //! read-only under certain conditions, but that is not a stable guarantee and should not be relied //! upon. //! +//! If you need to do an acquire load on read-only memory, you can do a relaxed load followed by an +//! acquire fence instead. +//! //! # Examples //! //! A simple spinlock: