Skip to content

Commit 75b6034

Browse files
Darksonnfbq
authored andcommitted
rust: time: 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-22-51da5f454a67@google.com
1 parent 5f1193d commit 75b6034

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

rust/helpers/time.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,37 +4,37 @@
44
#include <linux/ktime.h>
55
#include <linux/timekeeping.h>
66

7-
void rust_helper_fsleep(unsigned long usecs)
7+
__rust_helper void rust_helper_fsleep(unsigned long usecs)
88
{
99
fsleep(usecs);
1010
}
1111

12-
ktime_t rust_helper_ktime_get_real(void)
12+
__rust_helper ktime_t rust_helper_ktime_get_real(void)
1313
{
1414
return ktime_get_real();
1515
}
1616

17-
ktime_t rust_helper_ktime_get_boottime(void)
17+
__rust_helper ktime_t rust_helper_ktime_get_boottime(void)
1818
{
1919
return ktime_get_boottime();
2020
}
2121

22-
ktime_t rust_helper_ktime_get_clocktai(void)
22+
__rust_helper ktime_t rust_helper_ktime_get_clocktai(void)
2323
{
2424
return ktime_get_clocktai();
2525
}
2626

27-
s64 rust_helper_ktime_to_us(const ktime_t kt)
27+
__rust_helper s64 rust_helper_ktime_to_us(const ktime_t kt)
2828
{
2929
return ktime_to_us(kt);
3030
}
3131

32-
s64 rust_helper_ktime_to_ms(const ktime_t kt)
32+
__rust_helper s64 rust_helper_ktime_to_ms(const ktime_t kt)
3333
{
3434
return ktime_to_ms(kt);
3535
}
3636

37-
void rust_helper_udelay(unsigned long usec)
37+
__rust_helper void rust_helper_udelay(unsigned long usec)
3838
{
3939
udelay(usec);
4040
}

0 commit comments

Comments
 (0)