Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp1175509rdb; Wed, 24 Jan 2024 07:07:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IGQXu/wN6gM1EYZ2J3G0sHn3t8odhHgXJXE64gE0cAguYABkieRpQQTS0Cbk8+EDdEfsp3p X-Received: by 2002:a67:e699:0:b0:469:8f8a:b5c9 with SMTP id hv25-20020a67e699000000b004698f8ab5c9mr1179762vsb.13.1706108872668; Wed, 24 Jan 2024 07:07:52 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706108872; cv=pass; d=google.com; s=arc-20160816; b=DU89d6+PrmAcbFv4kQ9snoG1eQn4rnCmbhGUHMm579F4sAgpJ6ZxlQUjh8YMBGi75n KAcNPuXWunCuBy8yeQ7uSXKwz4Xf41iJd3MelDPkGf0rGswhabiUQEA69MAb/o4/FDFl 3D+yQT0jRcKNePSRRt0HRhkuz0jQmmKlLhGOJnCg0xJ/46Vn9R8iwSq/29EZoRp8k1BY LWh8zdfLvMyz/UR5J2+xQj+RFCr4KqyUMUpH80MBTPOzxlrDEX+csODCSltjJNR9mOuW Yd10I/kumoGMzfm8FaW0mgCwOJdZbxWq9b+DSUjPPcSH8DjosmSSNyET2WRdZD1PZYsJ 5e8A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=TQUhXDctFpKrx2fN5W2QrrWVrRbLkQpDhsup1S4036w=; fh=9xgLCIubB+enuxgjlvPdWgp/SjWwya4au7HqGMj8dEk=; b=NWiUbzra55xie+9dpLrMdBoDxQ53zUruoBgEEdTVaUFWOJkJNhiLOHt+2Y4d09yFA5 hWA6LCq5gGLrOYe8hmqd9Oxk4yTrRh185eSlHizx2vZG3tzfQsRzxRHcjWYzyUQs8ASW 7UHf8qYcKFH+1vDarGr6duhI7PSSsUa8QCqce0PFXitlatyGDaV/1qCtg5DMSnEXscLy 4ilyZEOQUFw+SdLaOpR+B4Zm5ogacU5Q+ZMeS5z3WkJY6yeD0m1OYefw0Yx4O9ahCU0Q QvM2cyqSULTbf566VSaCDfhmxv+J5kcrDwhHpcVJNcQXad6YW2n1tMiLlGwxRmJ1NFYE h6fg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=qmhCmpyA; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-37220-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-37220-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id jm12-20020a056102198c00b0046b14847446si10393vsb.270.2024.01.24.07.07.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jan 2024 07:07:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-37220-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=qmhCmpyA; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-37220-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-37220-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 64E221C23C65 for ; Wed, 24 Jan 2024 15:07:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CDDC9747A; Wed, 24 Jan 2024 15:07:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="qmhCmpyA" Received: from mail-ua1-f47.google.com (mail-ua1-f47.google.com [209.85.222.47]) (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 ADC2615BE for ; Wed, 24 Jan 2024 15:07:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706108863; cv=none; b=i7AhsQ7I6VsjmVVyAUhuRPIbRHzWpgoCt7ZUuDVB6vpsPd50jXQjDXQKc7y6AwqvJJ7ik3aSW9B2QWMTxoPp+sJJpY03ufURN864XgVJsh7tMymz/UBcQPZyjXQxMCWvxvnpM/yUN3feDphHIrTskRW/KCRtA91bClqct4d6rd8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706108863; c=relaxed/simple; bh=9IkzyGEiEKGVlY7GJByNMGnOjq/P6kexG1EtvIuQJEI=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=KcQg/gdXtmnpvc+yrEnM5A3U21UPKmKoBpoxQAAWIfim1kxvfB12YNqdmPecho9KMV/QjAChFFZ/uYu0FvqwEoAujoHCleUGcGHM2NACTog4FrdmOHB50mmFLzSWwjxzRKsURQfpp1f6KxHgdyUSfKVD7nyHCSIrABfu4JtenXM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=qmhCmpyA; arc=none smtp.client-ip=209.85.222.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Received: by mail-ua1-f47.google.com with SMTP id a1e0cc1a2514c-7d2c21d77afso3713197241.0 for ; Wed, 24 Jan 2024 07:07:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1706108860; x=1706713660; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=TQUhXDctFpKrx2fN5W2QrrWVrRbLkQpDhsup1S4036w=; b=qmhCmpyARXLoJ6MdMPHEVtCYATWCv7XwXXKY6aF4BbnQdNdqOZG69NvkTqPH9mGtJ7 xa2sS7sCNbJotAI50oi6IyqOJyeVyf4MqpFkITKycB+oOEsRP8uTGB/DlXpzVZuHj5Qs UDGHcgd8gr1S7XZcvmjd8ui5NlVPk/KT31WDudQfZUC/3SELMDA0MEkv9s37Fr4nrYEW tsM421VNdTbzvHs/5+ljRrPS+Q9p3ZZsy92Ao8FoEMoFZEtUttLcWXCFWmIS4o5Zrb6o lKBU/paVSaVCODJ7hJGk++YkO2R1Q80psAdaQOJXubUz/6Hohk0+iHRZv/O0A79yLFiy oTYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706108860; x=1706713660; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TQUhXDctFpKrx2fN5W2QrrWVrRbLkQpDhsup1S4036w=; b=E3j90zt/rho4TDIVkW2KBTVMBIzLWXRdMZeDdFuZKj4bASosenPGu47cC/ykSI0Pnf ckuziedSGql3AF93NprLdDZdWrpODv4besa/QagwD+36UDoDKn+1aCreHsSQzk+L2UJw V1V4PG11kbFQ5kDReQR0Ots1m6rZqUNidD/c5Xqx9vFE4DizNK+Cwz2MkteEyqOzf6Sp AOTeO+gVPvxiKZdfLccPtumEdbNw9dgPkB1KJDvr+G4W4J9lHX4j0x35oKShcg4a9A0Z Ag3tK7dp3nOOcvIvBDX0rKVhDuhfn890/aCIfCIj71cZ/f14ANmAfMSiRTPVuvvsYJSV Ic1A== X-Gm-Message-State: AOJu0YzQ3YW2TeBMY5QJ9YoewMN6sY0d0qYBQIlEh3WjjS6QhTvARSXJ o2mTeLHOT1PhpezWLWUQ362q/GxXJwrGP0lB/0fys7FQwISj9GC5v+n3NadSZ7TQnmpmJH5AxSQ ITZQXjzuv+pKp4sBB7foRYnCAdBTvGHtTFRWn X-Received: by 2002:a05:6122:45aa:b0:4b9:e8bd:3b2 with SMTP id de42-20020a05612245aa00b004b9e8bd03b2mr812775vkb.2.1706108860461; Wed, 24 Jan 2024 07:07:40 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240108-rb-new-condvar-methods-v4-0-88e0c871cc05@google.com> <20240108-rb-new-condvar-methods-v4-3-88e0c871cc05@google.com> In-Reply-To: <20240108-rb-new-condvar-methods-v4-3-88e0c871cc05@google.com> From: Alice Ryhl Date: Wed, 24 Jan 2024 16:07:29 +0100 Message-ID: Subject: Re: [PATCH v4 3/4] rust: sync: add `CondVar::wait_timeout` To: Miguel Ojeda , Alex Gaynor , Wedson Almeida Filho , Boqun Feng , Gary Guo , =?UTF-8?Q?Bj=C3=B6rn_Roy_Baron?= , Benno Lossin , Andreas Hindborg , Peter Zijlstra , Ingo Molnar , Will Deacon , Waiman Long , Tiago Lam , Thomas Gleixner Cc: Martin Rodriguez Reboredo , rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Jan 8, 2024 at 3:50=E2=80=AFPM Alice Ryhl wr= ote: > +/// The return type of `wait_timeout`. > +pub enum CondVarTimeoutResult { > + /// The timeout was reached. > + Timeout, > + /// Somebody woke us up. > + Woken { > + /// Remaining sleep duration. > + jiffies: Jiffies, > + }, > + /// A signal occurred. > + Signal { > + /// Remaining sleep duration. > + jiffies: Jiffies, > + }, > +} I just realized that this needs to be re-exported from kernel::sync. Otherwise this struct is unreachable, since the kernel::sync::condvar module is private. Maybe Miguel can just add that when he picks this? Alice