Files
erofs-linux/rust/kernel/sync/atomic
Boqun Feng 84c6d36bca rust: sync: atomic: Add Atomic<{usize,isize}>
Add generic atomic support for `usize` and `isize`. Note that instead of
mapping directly to `atomic_long_t`, the represention type
(`AtomicType::Repr`) is selected based on CONFIG_64BIT. This reduces
the necessity of creating `atomic_long_*` helpers, which could save
the binary size of kernel if inline helpers are not available. To do so,
an internal type `isize_atomic_repr` is defined, it's `i32` in 32bit
kernel and `i64` in 64bit kernel.

Signed-off-by: Boqun Feng <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Reviewed-by: Alice Ryhl <[email protected]>
Reviewed-by: Andreas Hindborg <[email protected]>
Reviewed-by: Benno Lossin <[email protected]>
Reviewed-by: Elle Rhumsaa <[email protected]>
Link: https://lore.kernel.org/all/[email protected]/
2025-09-15 09:38:34 +02:00
..