[WIP 1/3] rust: Introduce atomic module
Alice Ryhl
aliceryhl at google.com
Sat Mar 23 02:58:16 PDT 2024
On Sat, Mar 23, 2024 at 12:52 AM Andrew Lunn <andrew at lunn.ch> wrote:
>
> > +//! These primitives should have the same semantics as their C counterparts, for precise definitions
> > +//! of the semantics, please refer to tools/memory-model. Note that Linux Kernel Memory
> > +//! (Consistency) Model is the only model for Rust development in kernel right now, please avoid to
> > +//! use Rust's own atomics.
>
> Is it possible to somehow poison rusts own atomics? I would not be
> too surprised if somebody with good Rust knowledge but new to the
> kernel tries using Rusts atomics. Either getting the compiler to fail
> the build, or it throws an Opps on first invocation would be good.
We could try to get a flag added to the Rust standard library that
removes the core::sync::atomic module entirely, then pass that flag.
Alice
More information about the linux-arm-kernel
mailing list