From nobody Tue Nov 26 20:17:57 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XyYm86mkSz5dxZR; Tue, 26 Nov 2024 20:18:00 +0000 (UTC) (envelope-from christos@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XyYm8600nz445C; Tue, 26 Nov 2024 20:18:00 +0000 (UTC) (envelope-from christos@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732652280; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=4OKRIl7jdLVGV+r3gm+qUfMRZ1s2Rc4s9M6MD2i+7Qs=; b=qyx1ge7yQFKc8DA3PDvmcA2AEfGin/5o7qKdB9x271dnQf8gRTbkU7HayZDDczWopaYxp+ mySknEQQHbbJebX0jQ0q90+UyBAdnGEkW17L86I5Z9pfllqV1gEcc1ITqdiW6OIyWlFEIJ amDP3n16YpVLpSiG21qkd/y7o3InnKzPlJoYc65rBzQ+e31Om9212iR408tak+UelSDA+3 8eygelrbLhcF9ZutzWTvz2YmfhWIB9dAycbBiVkmTZnSaXNk67YMWh3umEmQgM3PNH8taM lr9l0GnLTBD1q8OQ6Qe2OTL29wdSQyUqzPpzFl3XTFwWZ0Nqsy8FlBGqJk1TAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732652280; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references:dkim-signature; bh=4OKRIl7jdLVGV+r3gm+qUfMRZ1s2Rc4s9M6MD2i+7Qs=; b=b/539uF6IQQtT1J4Hzn5pUjDvsEJs557P8x0QkbrBYBu7I1ZdZ7wKH70LPTiIa46qGl3wZ cur6CsFEaTni4VJaOGZid3Vm1WR28qaHfgGqmnpvAMaQmBP+Z9kGAFFIPJWY+6W76OBm7p /alh+cfQQgLYgNUHrEg4gxg8z9wVwadvsQgkMaUimnMhYkjJlhO71s+fd4SzX0cNOmnSp3 KSiyyrpxhKNqWjy1/uKaETI/H1oPbQyQoxOzRWAI96HWYVQWNuiJ24sFA4/VJB3iemUR/c jXC5XUiTsSDuejNY4fK3M2r6qMOcVhyuBoOUmtnC/+tBsECST0Nq5Idx9X9alw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732652280; a=rsa-sha256; cv=none; b=Ij9mfMCc6NsjEZxbgjZhMlEfjCG1Vcu0iB6+JVK/0XID+ieEff8YSYV67U/RdoldsVrJEI k5H8fk+PYW6afgaq5WqHL4DCgwPRqz6su73dGWemwFCDznUfsvBnxoeXvNR3whNFl1mG2F 4xAjPVIkCa/vKGjcMLnQgGR5JLawwYZNgV0Ufuq9a37IRBdqoMpKnsyCppoqfIxpKptnuv ce65En9ueAUXasv0cltlgb3xV5Py42uywGG5McPc/9crSGM3QzuVyz5U1AwOmK6abKxRvs do4wFkVeYYyDJWHmp+DZHj4lsimVeI9mu7BZT6iNZ+4U2KvcYm9iYcuxMs8j7w== Received: from margiolis.net (mail.margiolis.net [95.179.159.8]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA512) (Client did not present a certificate) (Authenticated sender: christos/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4XyYm827ybz14s4; Tue, 26 Nov 2024 20:18:00 +0000 (UTC) (envelope-from christos@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=mail; bh=Q9ztYIab8WlHRun 3FR6eHRsX/pAkGhH+x8zebLW4K8Q=; h=in-reply-to:references:subject:cc:to: from:date; d=margiolis.net; b=JM3LOS1GB/WSxhZDg1j+X3ySVxAgIjTYXovZRMoE mcckMpo//zEg3/PHQntcDPy91HKW2nI6JjV1A7I7dDUOt5ajVPNpJuAJWcrsArKLhhb4JT Mdfax9kxnFNL2A9Td0AJaSjZqEnzEkZ8jqsKBFKl+twTwSsAWqe0NgSQ+dx/U= Received: from tpad (ik117.dds.pwr.edu.pl [156.17.229.117]) by margiolis.net (OpenSMTPD) with ESMTPSA id 4b05d838 (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Tue, 26 Nov 2024 20:17:57 +0000 (UTC) Date: Tue, 26 Nov 2024 21:17:57 +0100 From: Christos Margiolis To: John Baldwin Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 5317480967bf - main - sound: Remove CHN_F_SLEEPING Message-ID: References: <202411261448.4AQEmw7Y084208@gitrepo.freebsd.org> <77c4113c-c023-4db3-826a-83be4e9baa42@FreeBSD.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <77c4113c-c023-4db3-826a-83be4e9baa42@FreeBSD.org> John Baldwin wrote: > On 11/26/24 06:48, Christos Margiolis wrote: > > The branch main has been updated by christos: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=5317480967bfc8bf678e4da3fce81bcb3f5b7836 > > [...] > > "\004TRIGGERED" \ > > + /* \006 */ \ > > "\005NOTRIGGER" \ > > - "\006SLEEPING" \ > > "\007NBIO" \ > > Hmm, new comment is mis-sorted? Yes. Oops. > > [...] > > + if (ch->intr_cv.cv_waiters == 0 && CHN_STOPPED(ch) && > > + ch->inprog == 0) { > > I'm not super excited about reading cv_waiters directly. Generally speaking > 'struct cv' is opaque to the rest of the kernel. Maybe add a little inline > routine or macro cv_waiters() that returns this value instead? Then it can > be documented in condvar.9 along with the caveats about when it is safe to > use. I see we already have cv_wmesg() in sys/sys/condvar.h to access cv_description. Maybe we could add a cv_waiters() macro in there as well? Christos