From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AB4F2C10DC1 for ; Wed, 6 Dec 2023 16:40:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1442586AbjLFQj5 (ORCPT ); Wed, 6 Dec 2023 11:39:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44690 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379382AbjLFQjz (ORCPT ); Wed, 6 Dec 2023 11:39:55 -0500 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6F481D4B; Wed, 6 Dec 2023 08:40:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=wozrE2JVwYdQea39v2odwAxayUucaERPPUek0lDwYT0=; b=WWF8SqBR/ol12mok8XrbFlc7fl YEOaC58edDRRgMxpvnnhTeDndYHyL6IFPhnbnJak0ECGFdjfnSbZsm/DgtWQHPQfyvHngJMSDpW4R H20VH7TT3uLbOsjTLdB3T0TL/Ub7uCPmjPui9606uR5ttR8eyhz68q7kmru/A7Sfk7in+lNjNHXHg wY4WkZXjOc1XsoVdvhcT0Bhn1eU6Ak5n/eGtVCgLHP8sDgsf2EtFaUyD5rtzSuXsFfL4ACpurcwBM 5sz0j5NB+ZXH/e4d9Kq8vuCtFxK7GDS9ES253aGL/2I39+VCGPkiTSRPoolnNn3I9X6+BbPu49Fm8 1Nm+8dZw==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1rAuw6-005DDo-34; Wed, 06 Dec 2023 16:39:47 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id B8EDC300451; Wed, 6 Dec 2023 17:39:45 +0100 (CET) Date: Wed, 6 Dec 2023 17:39:45 +0100 From: Peter Zijlstra To: Boqun Feng Cc: Alice Ryhl , Miguel Ojeda , Alex Gaynor , Wedson Almeida Filho , Gary Guo , =?iso-8859-1?Q?Bj=F6rn?= Roy Baron , Benno Lossin , Andreas Hindborg , Ingo Molnar , Will Deacon , Waiman Long , rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] rust: sync: add `CondVar::wait_timeout` Message-ID: <20231206163945.GC36423@noisy.programming.kicks-ass.net> References: <20231206-rb-new-condvar-methods-v1-0-33a4cab7fdaa@google.com> <20231206-rb-new-condvar-methods-v1-2-33a4cab7fdaa@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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?