Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

rust: sync: atomic: Make Atomic*Ops pub(crate)

In order to write code over a generate Atomic<T> we need to make
Atomic*Ops public so that functions like `.load()` and `.store()` are
available. Make these pub(crate) at the beginning so the usage in kernel
crate is supported.

Tested-by: David Gow <davidgow@google.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
Link: https://patch.msgid.link/20251022035324.70785-2-boqun.feng@gmail.com

+2 -1
+2 -1
rust/kernel/sync/atomic.rs
··· 22 22 23 23 pub use internal::AtomicImpl; 24 24 pub use ordering::{Acquire, Full, Relaxed, Release}; 25 + pub(crate) use internal::{AtomicArithmeticOps, AtomicBasicOps, AtomicExchangeOps}; 25 26 26 27 use crate::build_error; 27 - use internal::{AtomicArithmeticOps, AtomicBasicOps, AtomicExchangeOps, AtomicRepr}; 28 + use internal::AtomicRepr; 28 29 use ordering::OrderingType; 29 30 30 31 /// A memory location which can be safely modified from multiple execution contexts.