Skip to content

Commit 9ba1aaf

Browse files
Darksonnfbq
authored andcommitted
rust: refcount: 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: Boqun Feng <boqun.feng@gmail.com> Link: https://patch.msgid.link/20260105-define-rust-helper-v2-17-51da5f454a67@google.com
1 parent 5e03eda commit 9ba1aaf

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

rust/helpers/refcount.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,27 @@
22

33
#include <linux/refcount.h>
44

5-
refcount_t rust_helper_REFCOUNT_INIT(int n)
5+
__rust_helper refcount_t rust_helper_REFCOUNT_INIT(int n)
66
{
77
return (refcount_t)REFCOUNT_INIT(n);
88
}
99

10-
void rust_helper_refcount_set(refcount_t *r, int n)
10+
__rust_helper void rust_helper_refcount_set(refcount_t *r, int n)
1111
{
1212
refcount_set(r, n);
1313
}
1414

15-
void rust_helper_refcount_inc(refcount_t *r)
15+
__rust_helper void rust_helper_refcount_inc(refcount_t *r)
1616
{
1717
refcount_inc(r);
1818
}
1919

20-
void rust_helper_refcount_dec(refcount_t *r)
20+
__rust_helper void rust_helper_refcount_dec(refcount_t *r)
2121
{
2222
refcount_dec(r);
2323
}
2424

25-
bool rust_helper_refcount_dec_and_test(refcount_t *r)
25+
__rust_helper bool rust_helper_refcount_dec_and_test(refcount_t *r)
2626
{
2727
return refcount_dec_and_test(r);
2828
}

0 commit comments

Comments
 (0)