Files
linux/rust/helpers
Boqun Feng d9ea5a41ce rust: sync: Add memory barriers
Memory barriers are building blocks for concurrent code, hence provide
a minimal set of them.

The compiler barrier, barrier(), is implemented in inline asm instead of
using core::sync::atomic::compiler_fence() because memory models are
different: kernel's atomics are implemented in inline asm therefore the
compiler barrier should be implemented in inline asm as well. Also it's
currently only public to the kernel crate until there's a reasonable
driver usage.

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: Elle Rhumsaa <elle@weathered-steel.dev>
Link: https://lore.kernel.org/all/20250719030827.61357-10-boqun.feng@gmail.com/
2025-09-15 09:38:34 +02:00
..
2025-09-15 09:38:32 +02:00
2025-09-15 09:38:34 +02:00
2025-07-23 02:05:58 +02:00
2025-05-19 12:55:40 +05:30
2025-05-19 12:55:40 +05:30
2025-07-09 00:04:33 +02:00
2025-09-15 09:38:34 +02:00
2025-05-11 17:48:24 -07:00
2024-10-08 15:44:36 +02:00
2024-12-20 17:19:26 +01:00