Skip to content

Commit 8618307

Browse files
DarksonnYuryNorov
authored andcommitted
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>
1 parent ac3dc18 commit 8618307

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

rust/helpers/bitops.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,25 @@
22

33
#include <linux/bitops.h>
44

5+
__rust_helper
56
void rust_helper___set_bit(unsigned long nr, unsigned long *addr)
67
{
78
__set_bit(nr, addr);
89
}
910

11+
__rust_helper
1012
void rust_helper___clear_bit(unsigned long nr, unsigned long *addr)
1113
{
1214
__clear_bit(nr, addr);
1315
}
1416

17+
__rust_helper
1518
void rust_helper_set_bit(unsigned long nr, volatile unsigned long *addr)
1619
{
1720
set_bit(nr, addr);
1821
}
1922

23+
__rust_helper
2024
void rust_helper_clear_bit(unsigned long nr, volatile unsigned long *addr)
2125
{
2226
clear_bit(nr, addr);

0 commit comments

Comments
 (0)