From ad68b55a9ed0e5ce16508cb10081a73ea8f4bbef Mon Sep 17 00:00:00 2001 From: FUJITA Tomonori Date: Mon, 3 Nov 2025 20:29:57 +0900 Subject: rust: add udelay() function Add udelay() function, inserts a delay based on microseconds with busy waiting, in preparation for supporting read_poll_timeout_atomic(). Reviewed-by: Andreas Hindborg Reviewed-by: Alice Ryhl Signed-off-by: FUJITA Tomonori Acked-by: Andreas Hindborg Link: https://patch.msgid.link/20251103112958.2961517-2-fujita.tomonori@gmail.com Signed-off-by: Danilo Krummrich --- rust/helpers/time.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'rust/helpers/time.c') diff --git a/rust/helpers/time.c b/rust/helpers/time.c index a318e9fa4408..67a36ccc3ec4 100644 --- a/rust/helpers/time.c +++ b/rust/helpers/time.c @@ -33,3 +33,8 @@ s64 rust_helper_ktime_to_ms(const ktime_t kt) { return ktime_to_ms(kt); } + +void rust_helper_udelay(unsigned long usec) +{ + udelay(usec); +} -- cgit