[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251202-define-rust-helper-v1-41-a2e13cbc17a6@google.com>
Date: Tue, 02 Dec 2025 19:38:05 +0000
From: Alice Ryhl <aliceryhl@...gle.com>
To: rust-for-linux@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, Alice Ryhl <aliceryhl@...gle.com>,
Andreas Hindborg <a.hindborg@...nel.org>, Boqun Feng <boqun.feng@...il.com>,
FUJITA Tomonori <fujita.tomonori@...il.com>, Frederic Weisbecker <frederic@...nel.org>,
Lyude Paul <lyude@...hat.com>, Thomas Gleixner <tglx@...utronix.de>,
Anna-Maria Behnsen <anna-maria@...utronix.de>, John Stultz <jstultz@...gle.com>,
Stephen Boyd <sboyd@...nel.org>, Fiona Behrens <me@...enk.dev>, Gary Guo <gary@...yguo.net>
Subject: [PATCH 41/46] rust: time: add __rust_helper to helpers
This is needed to inline these helpers into Rust code.
Signed-off-by: Alice Ryhl <aliceryhl@...gle.com>
---
Cc: Andreas Hindborg <a.hindborg@...nel.org>
Cc: Boqun Feng <boqun.feng@...il.com>
Cc: FUJITA Tomonori <fujita.tomonori@...il.com>
Cc: Frederic Weisbecker <frederic@...nel.org>
Cc: Lyude Paul <lyude@...hat.com>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: Anna-Maria Behnsen <anna-maria@...utronix.de>
Cc: John Stultz <jstultz@...gle.com>
Cc: Stephen Boyd <sboyd@...nel.org>
Cc: Fiona Behrens <me@...enk.dev>
Cc: Gary Guo <gary@...yguo.net>
---
rust/helpers/time.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/rust/helpers/time.c b/rust/helpers/time.c
index a318e9fa4408230881eed047154e30eb00e3cb6f..ce394641b17c371eb9b52dd1a753c04efd975d2d 100644
--- a/rust/helpers/time.c
+++ b/rust/helpers/time.c
@@ -4,32 +4,32 @@
#include <linux/ktime.h>
#include <linux/timekeeping.h>
-void rust_helper_fsleep(unsigned long usecs)
+__rust_helper void rust_helper_fsleep(unsigned long usecs)
{
fsleep(usecs);
}
-ktime_t rust_helper_ktime_get_real(void)
+__rust_helper ktime_t rust_helper_ktime_get_real(void)
{
return ktime_get_real();
}
-ktime_t rust_helper_ktime_get_boottime(void)
+__rust_helper ktime_t rust_helper_ktime_get_boottime(void)
{
return ktime_get_boottime();
}
-ktime_t rust_helper_ktime_get_clocktai(void)
+__rust_helper ktime_t rust_helper_ktime_get_clocktai(void)
{
return ktime_get_clocktai();
}
-s64 rust_helper_ktime_to_us(const ktime_t kt)
+__rust_helper s64 rust_helper_ktime_to_us(const ktime_t kt)
{
return ktime_to_us(kt);
}
-s64 rust_helper_ktime_to_ms(const ktime_t kt)
+__rust_helper s64 rust_helper_ktime_to_ms(const ktime_t kt)
{
return ktime_to_ms(kt);
}
--
2.52.0.158.g65b55ccf14-goog
Powered by blists - more mailing lists