Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp7989465rdb; Thu, 4 Jan 2024 14:45:49 -0800 (PST) X-Google-Smtp-Source: AGHT+IHHDVVqYyvShKSD1pZZQBWVVV5a61ntvwNVu0T3dviNArv5D5kvh/dLWZmpH0W93hMgJhYJ X-Received: by 2002:a05:6a21:1a8:b0:199:3699:60ed with SMTP id le40-20020a056a2101a800b00199369960edmr144690pzb.36.1704408349365; Thu, 04 Jan 2024 14:45:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704408349; cv=none; d=google.com; s=arc-20160816; b=p/z7k0uQ2wcCDb/fHayPHh/NnBvW8JY8uuQMYkftZzvZVqUq8mYdlwfdOBPzkBl/L3 BS3hTPR4jCh/dx/Wqr3k5J0P8PGkDjR+KkEBo6UB94gdELKrt8uoIgPxptASZMnRZgGg 7/7NYdRo6kmJ1oYuK321h7OR1mOdabgyLRNYzSK1Z0zwEJyD2UcwhJ2HO317jnjhSnaf erTBCQc2bGhLBWynh2FioGgTHeSe+JMSVdI1YS6iqr/dDWNR8dWQl//RWr+6ogWkASbH j0B2Vo2+zHy6KP3YUPKL2EmaJXL6KTl8VwQXK/xt7Eioeh9xfn/98osw2rUyF4gqL6k5 N88A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:feedback-id:dkim-signature; bh=SeB4ajz7ViEKbPrOyH94bEBl7Qai5rs8f9JUUiOHPqg=; fh=baON6TEuz/Uu+wFn69hOCT7hCu9WIFiIXOHPEdnlk6E=; b=iO1x7E5KLIakp2J294i433XA4LT1UeX4o70QxdVJbOU6w+QCsCuiMICWV90U359ZQQ r942OEQtFAUncMoQRwcnP+r+z4hQjzH4j04N/b6Btapf/6JTdAA2fb6sUxi6x2trR818 YZdcAFkCXnv0PxTKKyz/V8WX7DdrnA95yQPTNsFQJkhvV/dIX7u6NMMRDAAVAEyHpluc CJ10pXpT7SCQtTagaeluqi1DJGtvvlFtgyPqXbYKIrJLPIigbggbLg3Lnd/sFzbnfAIQ E0Y3cM1YdVlG7p5mp5i6X81hIVFxzFnhBbdLuEHelcFH/+a2XUZzhSGg7O4aDTBaSsdJ fTSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=JsTGqUy0; spf=pass (google.com: domain of linux-kernel+bounces-17302-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-17302-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id gv15-20020a17090b11cf00b0028b636edac3si322868pjb.107.2024.01.04.14.45.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jan 2024 14:45:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-17302-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=JsTGqUy0; spf=pass (google.com: domain of linux-kernel+bounces-17302-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-17302-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id E26CAB24241 for ; Thu, 4 Jan 2024 22:45:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 29B9D2D029; Thu, 4 Jan 2024 22:45:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="JsTGqUy0" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-qk1-f180.google.com (mail-qk1-f180.google.com [209.85.222.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0E2DD2C6B9; Thu, 4 Jan 2024 22:45:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-qk1-f180.google.com with SMTP id af79cd13be357-7818ab57d7dso70371485a.2; Thu, 04 Jan 2024 14:45:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704408333; x=1705013133; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:feedback-id:from:to:cc:subject:date :message-id:reply-to; bh=SeB4ajz7ViEKbPrOyH94bEBl7Qai5rs8f9JUUiOHPqg=; b=JsTGqUy0UYP8yZSKrgi5JK06MEG9SIjNh3O8XHQOBPMsOtnnxyZsMgPqgxjcnMBQHS KbjQmBuAS4rNRH36D8ZlYVkNEs/jQS60pgj850WPk8m9NlshfbL8WsTKZPjtewVzOK0D omZhw6nAZuIQ8p2X1ZitZXvcN6PMm8jyRanrjkw2tHsm0yKqJD0zBejYLSUWlv0j1D9G 6yBJzgc+xRLouC7mLnit2uaX2p+n7DWjxLfa5ByxQmKMIbrAbXqnbKEwjD0FjOlOx8S0 8M1a/j35FyfPB3h4wEqEGqjPcvxlmlb3mLanmHCdl06f3KQnA4Vp2IzpPNm2qSI1RXMN SLRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704408333; x=1705013133; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:feedback-id:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SeB4ajz7ViEKbPrOyH94bEBl7Qai5rs8f9JUUiOHPqg=; b=qoBTUS8b/rGhoqf7htXxoYLLLoq/mreu343Zyl/9aHo659SvhMnNl9cD5JcGqtlLH8 +eZYsPaGO7/doLbcils5qEhXDGeGnTY2oajqcWe54nxsSCZLjnrdfv5YPi6AI6+M91rq HiEPFJfio/5Ocz6NKDGFZJYtCqLNAtIajVfcxO2JuYEjRojImJx8IOf4EcvOIhsi99n6 rGFb5TLdKHop5sL2yLpUPKTNVKBA7yukXIEvcnV7qJEhcHAAvjlhWgRYcIMVug3c9xo2 cBy8ViLYCZnPi9Ov2a5OX6PwZrUVCxvENeoOGRDe2cu/vBH0yqtXPEXhC5JPZnoqh7U1 Qfnw== X-Gm-Message-State: AOJu0Yx4cPEaEIsAyONeLvY3CdgLfrcptECiUn63aVwDbVvt/Sgyygcd hDIwddHXK8MOhIN5jJPloBk= X-Received: by 2002:a05:620a:90f:b0:781:7a9e:6a55 with SMTP id v15-20020a05620a090f00b007817a9e6a55mr1159549qkv.131.1704408332809; Thu, 04 Jan 2024 14:45:32 -0800 (PST) Received: from auth1-smtp.messagingengine.com (auth1-smtp.messagingengine.com. [66.111.4.227]) by smtp.gmail.com with ESMTPSA id c22-20020a05620a11b600b00781e1c466e7sm141707qkk.24.2024.01.04.14.45.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jan 2024 14:45:32 -0800 (PST) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailauth.nyi.internal (Postfix) with ESMTP id 0113527C005A; Thu, 4 Jan 2024 17:45:30 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Thu, 04 Jan 2024 17:45:30 -0500 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvdegkedgtddvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggujgesthdtredttddtvdenucfhrhhomhepuehoqhhu nhcuhfgvnhhguceosghoqhhunhdrfhgvnhhgsehgmhgrihhlrdgtohhmqeenucggtffrrg htthgvrhhnpeehudfgudffffetuedtvdehueevledvhfelleeivedtgeeuhfegueeviedu ffeivdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe gsohhquhhnodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdeiledvgeehtdei gedqudejjeekheehhedvqdgsohhquhhnrdhfvghngheppehgmhgrihhlrdgtohhmsehfih igmhgvrdhnrghmvg X-ME-Proxy: Feedback-ID: iad51458e:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 4 Jan 2024 17:45:28 -0500 (EST) Date: Thu, 4 Jan 2024 14:44:19 -0800 From: Boqun Feng To: Alice Ryhl Cc: Miguel Ojeda , Alex Gaynor , Wedson Almeida Filho , Gary Guo , =?iso-8859-1?Q?Bj=F6rn?= Roy Baron , Benno Lossin , Andreas Hindborg , Peter Zijlstra , Ingo Molnar , Will Deacon , Waiman Long , Tiago Lam , Thomas Gleixner , Martin Rodriguez Reboredo , rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 3/4] rust: sync: add `CondVar::wait_timeout` Message-ID: References: <20240104-rb-new-condvar-methods-v3-0-70b514fcbe52@google.com> <20240104-rb-new-condvar-methods-v3-3-70b514fcbe52@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240104-rb-new-condvar-methods-v3-3-70b514fcbe52@google.com> On Thu, Jan 04, 2024 at 02:02:43PM +0000, Alice Ryhl wrote: [...] > diff --git a/rust/kernel/task.rs b/rust/kernel/task.rs > index 9451932d5d86..ffb4a51eb898 100644 > --- a/rust/kernel/task.rs > +++ b/rust/kernel/task.rs > @@ -7,6 +7,9 @@ > use crate::{bindings, types::Opaque}; > use core::{marker::PhantomData, ops::Deref, ptr}; > Missing: use core::ffi::c_long; here. Regards, Boqun > +/// A sentinal value used for infinite timeouts. > +pub const MAX_SCHEDULE_TIMEOUT: c_long = c_long::MAX; > + > /// Returns the currently running task. > #[macro_export] > macro_rules! current { > > -- > 2.43.0.472.g3155946c3a-goog >