summaryrefslogtreecommitdiff
path: root/rust/kernel/fs/file.rs
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@gmail.com>2025-11-03 20:29:58 +0900
committerDanilo Krummrich <dakr@kernel.org>2025-11-04 14:06:47 +0100
commit46f045db5a94cd50b24dc1449bdd444e4473b28b (patch)
tree1ac0f529f28908ebdc3920077e94f07849bb645f /rust/kernel/fs/file.rs
parentad68b55a9ed0e5ce16508cb10081a73ea8f4bbef (diff)
rust: Add read_poll_timeout_atomic function
Add read_poll_timeout_atomic function which polls periodically until a condition is met, an error occurs, or the attempt limit is reached. The C's read_poll_timeout_atomic() is used for the similar purpose. In atomic context the timekeeping infrastructure is unavailable, so reliable time-based timeouts cannot be implemented. So instead, the helper accepts a maximum number of attempts and busy-waits (udelay + cpu_relax) between tries. Reviewed-by: Alice Ryhl <aliceryhl@google.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com> Link: https://patch.msgid.link/20251103112958.2961517-3-fujita.tomonori@gmail.com [ Adjust imports to use "kernel vertical" style. - Danilo ] Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Diffstat (limited to 'rust/kernel/fs/file.rs')
0 files changed, 0 insertions, 0 deletions