From nobody Wed Nov 27 15:33:42 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 4Xz3Pk6Z64z5fMs4; Wed, 27 Nov 2024 15:33:46 +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 4Xz3Pk61Tnz4hqy; Wed, 27 Nov 2024 15:33:46 +0000 (UTC) (envelope-from christos@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732721626; 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=EVpQid/1C+0S/0A7VaoQthDRKetRRQJK7l1byE7b/QQ=; b=MF7y4cnIUUtb/fUu62mV1xtxjV1bGfuzvHL/XtCMyUIQZ4ycV2S0eNVUFNV8ZGbYZ8oHQi SxvHIQo1yZUzHFAFlTMDPRESU8nj+17BBVMrvH49LRCMkDMJjbNq20giKazX2n1WPzA8PC UN3paEdZ3aLf2YD8ko1Y5Dja0zPfAhcSYoj8diE0Wo9tPmQ3cw8QqNYbJ8g3GGtMWumqBa JankTexYgenmrMYsfqZZzWffx6p9ke2IVGV7veRnTigdk1hDkpkzh84pLUkcr+BIp+pT4c 1S8r/HPKeWLHAYpR43EPHDyKRxdWTtMUOUrrYvMLKRyYMgDcxIPMk5Hp6mu6Lg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732721626; 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=EVpQid/1C+0S/0A7VaoQthDRKetRRQJK7l1byE7b/QQ=; b=GGF8LY1gkGr0QcnZE+4FLK1iSmpxaJkqzWSYF4nMAx0xOZ0gp8H18iC1k25SI3AXqJGy4j 3TriM3HEi9peHTkyQly80PZ69zqcEAHwe/nxYVohBztp5FaWrV6EI8mrv3GdQHihnEmxzj EyMHObht3Cx8AwJOHaCNpMeBgyYeMEHnuGycR58XPgcNhJfB38gDKagx4Ud3PCah3uiXDP voeVWUbXU8KAgFAoRwgPjNFLu5wFcWWRC0k4oWPqv51kdhUFTZHo1huqUsAV78+MNUT1f0 pPAOD72EpbVgzdR+9bl4a8YDY2DYPQdeigJ6dv+WQ/h0GfGmCJCixoSDgw3beA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732721626; a=rsa-sha256; cv=none; b=WGf1YsnnCk+qzVoBprDuU3+lUMIohFeoqLhnINcWsYx80b6qs2oW9GKWPsv9QCIWiN2IFp SiJEdXy879js2q0g1hJGmB5b/8oaSpSOQVl67Ruli6W9G+66AVthD1DCc5/k+sf8K71cgv PY91d76deG+ciNfcyssBhGJGqoNff4FHJl/OeJCqy0ksKDo1x8QQb/WKIjiWLcfMUpvK2A Qrn0GNP+KUCYGzOIv4CgGdNZFHcXTO5Vm6Vdj3BowuAR/hb51slLeqJFNBSIWiDozdjkmk 4QwxTYy+xHU/NSbimXa5QVhiOiBUe6ueJYLEK4MxgbAxUxHNe0gQIffDbkBwqw== 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 4Xz3Pk2CZmzG79; Wed, 27 Nov 2024 15:33:46 +0000 (UTC) (envelope-from christos@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=mail; bh=X4E1cR0LUbRecKv 2xdyZ1VQ7wmzQsaPS4xJOFh2lwXM=; h=in-reply-to:references:subject:cc:to: from:date; d=margiolis.net; b=gCunmsAcvx0ydPeOXSBJu6IHeBSlAbDEz2DTVJ48 MXEsvHilVk56ryVZvR36lIK/QxnLhdUmBIosrwu8qspabG1E6ZnQ2+T6OdDEDZd5s56Y+a ISKBXQ9R/RO8u5sJqCqOrJgxEZLxgrhzBvqVC+79QiS/qEsEYXhcsECx20i0M= Received: from tpad (public-gprs242282.centertel.pl [31.60.93.171]) by margiolis.net (OpenSMTPD) with ESMTPSA id 059c2a08 (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Wed, 27 Nov 2024 15:33:43 +0000 (UTC) Date: Wed, 27 Nov 2024 16:33:42 +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: <74asrrtyd2ikapohanal6rqseac734wk4v4k4ifyrzqrt7jpff@xnvv5amia64w> References: <202411261448.4AQEmw7Y084208@gitrepo.freebsd.org> <77c4113c-c023-4db3-826a-83be4e9baa42@FreeBSD.org> <4234bd4a-29a0-4f95-bebb-d745c101cd25@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: <4234bd4a-29a0-4f95-bebb-d745c101cd25@FreeBSD.org> John Baldwin wrote: > On 11/26/24 12:17, Christos Margiolis wrote: > > 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? > > Yes, that is where I would add it. https://reviews.freebsd.org/D47779 https://reviews.freebsd.org/D47780 Christos