diff options
author | Boqun Feng <boqun.feng@gmail.com> | 2025-09-04 21:41:31 -0700 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2025-09-15 09:38:33 +0200 |
commit | 29c32c405e53605dfd24054a4460516f7f6e3938 (patch) | |
tree | 7e2819f65f3f7f61e4b8d3d825956010ade1ce36 /rust/helpers/mutex.c | |
parent | b638c9bc471030ebd898b57c5bf7c96f6d70cda4 (diff) |
rust: sync: atomic: Add generic atomics
To provide using LKMM atomics for Rust code, a generic `Atomic<T>` is
added, currently `T` needs to be Send + Copy because these are the
straightforward usages and all basic types support this.
Implement `AtomicType` for `i32` and `i64`, and so far only basic
operations load() and store() are introduced.
Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Reviewed-by: Benno Lossin <lossin@kernel.org>
Reviewed-by: Elle Rhumsaa <elle@weathered-steel.dev>
Link: https://lore.kernel.org/all/20250719030827.61357-5-boqun.feng@gmail.com/
Diffstat (limited to 'rust/helpers/mutex.c')
0 files changed, 0 insertions, 0 deletions