Re: [PATCH 2/2] rust: sync: add `CondVar::wait_timeout`

From: Peter Zijlstra
Date: Wed Dec 06 2023 - 11:40:05 EST


On Wed, Dec 06, 2023 at 08:30:06AM -0800, Boqun Feng wrote:
> On Wed, Dec 06, 2023 at 10:09:24AM +0000, Alice Ryhl wrote:
> [...]
> > +
> > +/// The return type of `wait_timeout`.
> > +pub enum CondVarTimeoutResult {
> > + /// The timeout was reached.
> > + Timeout,
> > + /// Somebody woke us up.
> > + Woken {
> > + /// Remaining sleep duration.
> > + jiffies: u64,
>
> I have a Jiffies definition in the my upcoming timer patchset:
>
> /// The time unit of Linux kernel. One jiffy equals (1/HZ) second.
> pub type Jiffies = core::ffi::c_ulong;
>
> Maybe you can add that (in a separate patch) in kernel::time?

Urgh, why are we using jiffies in 2023?