]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
rust: rcu: Add __rust_helper to helpers
authorAlice Ryhl <aliceryhl@google.com>
Mon, 5 Jan 2026 12:42:29 +0000 (12:42 +0000)
committerBoqun Feng <boqun.feng@gmail.com>
Fri, 9 Jan 2026 11:01:42 +0000 (19:01 +0800)
This is needed to inline these helpers into Rust code.

Reviewed-by: Boqun Feng <boqun.feng@gmail.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
Signed-off-by: Alice Ryhl <aliceryhl@google.com>
Reviewed-by: Joel Fernandes (NVIDIA) <joel@joelfernandes.org>
Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
Link: https://patch.msgid.link/20260105-define-rust-helper-v2-16-51da5f454a67@google.com
rust/helpers/rcu.c

index f1cec6583513497e996f74835ca2c6c3f4a8c954..481274c058577276e20093a1014fc49f4a40421b 100644 (file)
@@ -2,12 +2,12 @@
 
 #include <linux/rcupdate.h>
 
-void rust_helper_rcu_read_lock(void)
+__rust_helper void rust_helper_rcu_read_lock(void)
 {
        rcu_read_lock();
 }
 
-void rust_helper_rcu_read_unlock(void)
+__rust_helper void rust_helper_rcu_read_unlock(void)
 {
        rcu_read_unlock();
 }