From nobody Wed Nov 27 15:12:02 2024 X-Original-To: dev-commits-src-all@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 4Xz2wh4hzHz5fL7P; Wed, 27 Nov 2024 15:12:04 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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 4Xz2wg6Fp1z4f0Y; Wed, 27 Nov 2024 15:12:03 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732720323; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vIC9FeSLMtVXs3s2A4UYaD+4IGYjjgs2/Pkq59Ga9ZQ=; b=jyFGzlZQUZqaZ+3x4+2AQ3KB3vwXFfdCXr2TOXCV6dtqmjyoPW612VNAfM13HhVOTuK7XQ bYhVF3Pp4rSFiJwctP90+8Eigr2aBKygL1HTIomGcupcqftCPemKlN8ESDtpmtkBdEy4oO fR9L+deO/W+iq5dyHpOCQd1rJsJVV6hp3tO5EFAQxBBfz4L1jbmQgDzl0nE4qNO3S6ksA6 fxCo+KqvqYGDGQNHUrcu2axcplBIt1kvgVllJ8DmhhpidP1DjFJPh8iFKlJ2q3cR4RMKlx Z+PjeDmwiP1ENFIGdHDKgm9YUb7mA+wEIhd1wQL6C7SOQN/zaoMGo7VtrHkyqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732720323; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vIC9FeSLMtVXs3s2A4UYaD+4IGYjjgs2/Pkq59Ga9ZQ=; b=eoNQeo/pGUGn96fFqscv3eN79udB+gLD8x/f3kK125Ysa4U+Apf7ufP2hCFp+/+rxIpRgQ DmaDmQu4BbowHISpwLzTZVYgkCf40VOI3JPIAypJ8U9Hyuv543urLrAq0tHVG+xm+QNTH9 hNeoNukI5h3yUWr6Fpr7rEn3C61g76ggw/pSPbvvmbRtZecQ82ouRtvSmy5zrz/JgLtP3P WvXFUGBTyJOslRxq/o4b/imE4ThAwU6CSfcOV1UfAYyok+MiGPRqaizvo9nAzwuNW4nXPS vzlNmgxsKiyH3DR2pfwW/IyxVbfjZEu1I7Os3seIy+Tuu5dTd2bgXcquqlMkLQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732720323; a=rsa-sha256; cv=none; b=Ni51WK9dUkZnsLUPEoy4F3TsTy4NbGbeUo2edskNdW4KmsCyP8IV4Hn2eAO4Bfo72m1bmo PnX45zHWLZXnCGF9m2E3WLvBpmlr4lAlmCiHaEATMoqgNwFjLEqcCmmQpedI6S8dYsP+UZ 75nPHfBASW/NLnCc1izhn8Nk+mhlx/yyLJKdUD3Oo+Jtl1IV/io6YW1CWkJXQ4a/fEvzeR C7dWRuHxbH38GgCRvOX0nqFAGH45qhog4uoQes89Dcz5OuHG8EGBtkwxJjBXxRiSamOmxz n61OxROFkmt+OGa45nA++qhdDmRk1OLNaFvcUfHteajrhdR/xB4Gq0m3G7i7bw== Received: from [IPV6:2601:5c0:4200:b830:b1e3:c08e:70c4:74aa] (unknown [IPv6:2601:5c0:4200:b830:b1e3:c08e:70c4:74aa]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Xz2wg4fWZzH0v; Wed, 27 Nov 2024 15:12:03 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <4234bd4a-29a0-4f95-bebb-d745c101cd25@FreeBSD.org> Date: Wed, 27 Nov 2024 10:12:02 -0500 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 5317480967bf - main - sound: Remove CHN_F_SLEEPING Content-Language: en-US To: Christos Margiolis Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202411261448.4AQEmw7Y084208@gitrepo.freebsd.org> <77c4113c-c023-4db3-826a-83be4e9baa42@FreeBSD.org> From: John Baldwin In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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. -- John Baldwin