diff options
author | FUJITA Tomonori <fujita.tomonori@gmail.com> | 2025-06-10 22:28:21 +0900 |
---|---|---|
committer | Andreas Hindborg <a.hindborg@kernel.org> | 2025-06-24 19:52:47 +0200 |
commit | d9fc00dc73542eef98db74085447c57174ca290d (patch) | |
tree | 5b3c3f06c0c96698d02a6f6759148a502afec7f0 /rust/kernel/workqueue.rs | |
parent | ced9ccd21fbc8ca941e6a0c2820c2df89239ccb9 (diff) |
rust: time: Add HrTimerExpires trait
Introduce the `HrTimerExpires` trait to represent types that can be
used as expiration values for high-resolution timers. Define a
required method, `into_nanos()`, which returns the expiration time as a
raw nanosecond value suitable for use with C's hrtimer APIs.
Also extend the `HrTimerMode` to use the `HrTimerExpires` trait.
This refactoring is a preparation for enabling hrtimer code to work
uniformly with both absolute and relative expiration modes.
Reviewed-by: Andreas Hindborg <a.hindborg@kernel.org>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
Link: https://lore.kernel.org/r/20250610132823.3457263-4-fujita.tomonori@gmail.com
[ changed conversion method names to `as_*` - Andreas ]
Signed-off-by: Andreas Hindborg <a.hindborg@kernel.org>
Diffstat (limited to 'rust/kernel/workqueue.rs')
0 files changed, 0 insertions, 0 deletions