mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-02 02:19:54 -04:00
rust: bitops: add __rust_helper to helpers
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> Signed-off-by: Yury Norov (NVIDIA) <yury.norov@gmail.com>
This commit is contained in:
committed by
Yury Norov (NVIDIA)
parent
ac3dc186df
commit
8618307b52
@@ -2,21 +2,25 @@
|
||||
|
||||
#include <linux/bitops.h>
|
||||
|
||||
__rust_helper
|
||||
void rust_helper___set_bit(unsigned long nr, unsigned long *addr)
|
||||
{
|
||||
__set_bit(nr, addr);
|
||||
}
|
||||
|
||||
__rust_helper
|
||||
void rust_helper___clear_bit(unsigned long nr, unsigned long *addr)
|
||||
{
|
||||
__clear_bit(nr, addr);
|
||||
}
|
||||
|
||||
__rust_helper
|
||||
void rust_helper_set_bit(unsigned long nr, volatile unsigned long *addr)
|
||||
{
|
||||
set_bit(nr, addr);
|
||||
}
|
||||
|
||||
__rust_helper
|
||||
void rust_helper_clear_bit(unsigned long nr, volatile unsigned long *addr)
|
||||
{
|
||||
clear_bit(nr, addr);
|
||||
|
||||
Reference in New Issue
Block a user