diff options
author | Gary Guo <gary@garyguo.net> | 2024-09-14 00:29:23 +0300 |
---|---|---|
committer | Miguel Ojeda <ojeda@kernel.org> | 2024-11-11 01:58:00 +0300 |
commit | d072acda4862f095ec9056979b654cc06a22cc68 (patch) | |
tree | 270061d20e18a9c5ff90cef8e4deed75bdb93c63 /rust/kernel/time.rs | |
parent | 2fd6f55c048d0c863ffbc8590b1bd2edb5ff13e5 (diff) | |
download | linux-d072acda4862f095ec9056979b654cc06a22cc68.tar.xz |
rust: use custom FFI integer types
Currently FFI integer types are defined in libcore. This commit creates
the `ffi` crate and asks bindgen to use that crate for FFI integer types
instead of `core::ffi`.
This commit is preparatory and no type changes are made in this commit
yet.
Signed-off-by: Gary Guo <gary@garyguo.net>
Link: https://lore.kernel.org/r/20240913213041.395655-4-gary@garyguo.net
[ Added `rustdoc`, `rusttest` and KUnit tests support. Rebased on top of
`rust-next` (e.g. migrated more `core::ffi` cases). Reworded crate
docs slightly and formatted. - Miguel ]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Diffstat (limited to 'rust/kernel/time.rs')
-rw-r--r-- | rust/kernel/time.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rust/kernel/time.rs b/rust/kernel/time.rs index e3bb5e89f88d..379c0f5772e5 100644 --- a/rust/kernel/time.rs +++ b/rust/kernel/time.rs @@ -12,10 +12,10 @@ pub const NSEC_PER_MSEC: i64 = bindings::NSEC_PER_MSEC as i64; /// The time unit of Linux kernel. One jiffy equals (1/HZ) second. -pub type Jiffies = core::ffi::c_ulong; +pub type Jiffies = crate::ffi::c_ulong; /// The millisecond time unit. -pub type Msecs = core::ffi::c_uint; +pub type Msecs = crate::ffi::c_uint; /// Converts milliseconds to jiffies. #[inline] |