linux/rust/kernel/time
FUJITA Tomonori 6a8e2c63f2 rust: time: rename ClockSource trait to ClockId
The `ClockSource` trait has nothing to do with the C `struct clocksource`
in `include/linux/clocksource.h`, which abstracts the hardware counter
used as a source of time for the majority of the clockids. The trait
instead carries a `clockid_t` `ID`, i.e. one of the IDs of "the various
system clocks (for POSIX.1b interval timers)" as described in
include/uapi/linux/time.h (CLOCK_MONOTONIC, CLOCK_REALTIME, ...). It thus
plays the role of a `clockid_t`, and the `ClockSource` name overlaps
confusingly with the C `clocksource` concept when reading across C and
Rust code.

Rename the trait to `ClockId` to reflect that it represents a
`clockid_t`. This is a pure rename; there is no functional change.

Suggested-by: John Stultz <jstultz@google.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
Link: https://lore.kernel.org/rust-for-linux/CANDhNCrKMdHCmL76LWCROVF2Ly-9NxmfmQ2T+P=iv34aVkO2uQ@mail.gmail.com/
Reviewed-by: Andreas Hindborg <a.hindborg@kernel.org>
Link: https://msgid.link/20260722001050.4115708-1-tomo@flapping.org
Signed-off-by: Andreas Hindborg <a.hindborg@kernel.org>
2026-09-22 16:36:59 +02:00
..
hrtimer rust: hrtimer: Add HrTimerCallbackContext and ::forward() 2025-09-04 16:54:39 +02:00
delay.rs rust: time: warn and assert out-of-range input in fsleep() and udelay() 2026-09-22 16:01:23 +02:00
hrtimer.rs rust: time: rename ClockSource trait to ClockId 2026-09-22 16:36:59 +02:00