Files
linux/rust/helpers
Boqun Feng ac8f06ade3 rust: sync: atomic: Add Atomic<*{mut,const} T> support
Atomic pointer support is an important piece of synchronization
algorithm, e.g. RCU, hence provide the support for that.

Note that instead of relying on atomic_long or the implementation of
`Atomic<usize>`, a new set of helpers (atomic_ptr_*) is introduced for
atomic pointer specifically, this is because ptr2int casting would
lose the provenance of a pointer and even though in theory there are a
few tricks the provenance can be restored, it'll still be a simpler
implementation if C could provide atomic pointers directly. The side
effects of this approach are: we don't have the arithmetic and logical
operations for pointers yet and the current implementation only works
on ARCH_SUPPORTS_ATOMIC_RMW architectures, but these are implementation
issues and can be added later.

Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Gary Guo <gary@garyguo.net>
Reviewed-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
Link: https://patch.msgid.link/20260120140503.62804-3-boqun.feng@gmail.com
Link: https://patch.msgid.link/20260303201701.12204-8-boqun@kernel.org
2026-03-08 11:06:49 +01:00
..
2026-01-09 19:01:41 +08:00
2026-01-26 03:48:25 +01:00
2025-05-19 12:55:40 +05:30
2026-01-09 19:01:41 +08:00
2025-12-15 22:43:08 +01:00
2026-01-26 03:49:04 +01:00
2025-12-15 14:13:03 +01:00
2025-12-15 22:26:10 +01:00
2025-12-15 22:26:10 +01:00
2026-01-26 03:49:56 +01:00
2026-01-26 03:50:21 +01:00
2026-01-26 03:49:56 +01:00
2025-12-15 22:39:11 +01:00
2026-01-20 18:52:43 +01:00
2026-01-09 19:01:42 +08:00
2026-01-07 16:12:15 +01:00