summaryrefslogtreecommitdiff
path: root/rust/kernel/alloc/kvec/errors.rs
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@gmail.com>2025-06-30 22:10:11 +0900
committerAndreas Hindborg <a.hindborg@kernel.org>2026-03-23 08:29:48 +0100
commit67b598db7ef107d80091c4c957694b9a2feffa4c (patch)
tree18373d085fef4ef201af719c80316225adf2c2c8 /rust/kernel/alloc/kvec/errors.rs
parentc51866f65b8ac37b8883a2e80ada13c8cd4d2f7b (diff)
rust: time: make ClockSource unsafe trait
Mark the ClockSource trait as unsafe and document its safety requirements. Specifically, implementers must guarantee that their `ktime_get()` implementation returns a value in the inclusive range [0, KTIME_MAX]. Update all existing implementations to use `unsafe impl` with corresponding safety comments. Note that there could be potential users of a customized clock source [1] so we don't seal the trait. Link: https://lore.kernel.org/rust-for-linux/Z9xb1r1x5tOzAIZT@boqun-archlinux/ [1] Suggested-by: Boqun Feng <boqun.feng@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com> Reviewed-by: Alice Ryhl <aliceryhl@google.com> Link: https://msgid.link/20250630131011.405219-1-fujita.tomonori@gmail.com [ Change range expressions in docs. - Andreas ] Signed-off-by: Andreas Hindborg <a.hindborg@kernel.org>
Diffstat (limited to 'rust/kernel/alloc/kvec/errors.rs')
0 files changed, 0 insertions, 0 deletions