summaryrefslogtreecommitdiff
path: root/rust/kernel/xarray.rs
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@gmail.com>2025-06-10 18:32:55 +0900
committerAndreas Hindborg <a.hindborg@kernel.org>2025-06-16 15:01:56 +0200
commit768dfbfc98e26cfad45f7165a1801d188f3cbd81 (patch)
tree876575ca9de53c7980c32cef1c20f3b1f29cddb1 /rust/kernel/xarray.rs
parent1664a671be46a0b0daf5250eb124d94a5501a64c (diff)
rust: time: Make Instant generic over ClockSource
Refactor the Instant type to be generic over a ClockSource type parameter, enabling static enforcement of clock correctness across APIs that deal with time. Previously, the clock source was implicitly fixed (typically CLOCK_MONOTONIC), and developers had to ensure compatibility manually. This design eliminates runtime mismatches between clock sources, and enables stronger type-level guarantees throughout the timer subsystem. Reviewed-by: Andreas Hindborg <a.hindborg@kernel.org> Reviewed-by: Boqun Feng <boqun.feng@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com> Link: https://lore.kernel.org/r/20250610093258.3435874-3-fujita.tomonori@gmail.com Signed-off-by: Andreas Hindborg <a.hindborg@kernel.org>
Diffstat (limited to 'rust/kernel/xarray.rs')
0 files changed, 0 insertions, 0 deletions