Re: [PATCH v5 03/10] rust: sync: atomic: Add ordering annotation types

From
Alice Ryhl <aliceryhl@google.com>
Date
2025-06-19 12:19:37
Also in
linux-arch, lkml
Reply to
Peter Zijlstra, 2025-06-19
On Thu, Jun 19, 2025 at 12:31 PM Peter Zijlstra [off-list ref] wrote:
On Wed, Jun 18, 2025 at 09:49:27AM -0700, Boqun Feng wrote:
quoted
+//! Memory orderings.
+//!
+//! The semantics of these orderings follows the [`LKMM`] definitions and rules.
+//!
+//! - [`Acquire`] and [`Release`] are similar to their counterpart in Rust memory model.
So I've no clue what the Rust memory model states, and I'm assuming
it is very similar to the C11 model. I have also forgotten what LKMM
states :/

Do they all agree on what RELEASE+ACQUIRE makes?
Rust just uses the C11 model outright, so yes it's the same. There's
no separate Rust memory model as far as atomics are concerned.

Alice
Thread (55 messages) 55 messages, 6 authors, last reply 2025-07-05
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help