From nobody Wed Oct 12 17:49:10 2022 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 4MngBb1wnkz4ZPlY; Wed, 12 Oct 2022 17:49:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MngBb0hf6z3cxX; Wed, 12 Oct 2022 17:49:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1665596951; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KT6kxjUhZO7pEyCmluMzoMZCDX+erjwJwTPUoi+wDrM=; b=uz1L+TlpH5P5j3IIC7cxoeTiOK6JiYG5C6adF4STL0uWkrBqjXJnHvKLmc876dTf6TAaJ0 CiShw3BzcSrHQMSjax9rE2zidwbF+xGnGfb0bohBabWN+498AWYeZEr/7wZu9Hzi1YNqQg 9XENS/BidvBIaNOF/cIamjq3dzkgVaECjqSo+4q8Zoq55b8qDWSwu0DVoWucGbaLNuRnbP AaTKVLwj+XeIZuY0TuOi3pX73fjRr74/34n6YkIFsyely3z0Jwc59HyzoVz7wzjZhB6Os/ v8S5PaHlMgBnc4I4Y8mSQX8SZI9l8jdeMbC/uPAWSTdoe3mM4VwAv2jhbOPYqA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4MngBZ6cZfz1NkM; Wed, 12 Oct 2022 17:49:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 29CHnAhp083200; Wed, 12 Oct 2022 17:49:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 29CHnApl083199; Wed, 12 Oct 2022 17:49:10 GMT (envelope-from git) Date: Wed, 12 Oct 2022 17:49:10 GMT Message-Id: <202210121749.29CHnApl083199@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ka Ho Ng Subject: git: 87fa64c569c5 - main - refcount.9: Update refcount_acquire(9) description after a67d540832b8 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: khng X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 87fa64c569c54c2ec444ada699acde2ada696d97 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1665596951; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KT6kxjUhZO7pEyCmluMzoMZCDX+erjwJwTPUoi+wDrM=; b=YMMKTT3pfl37D+aOAB14aMn4+/6rqttpb840POoX1RJ5L6N4L8lL+IX3z9ZgUKGjumSJ4Y rJJHNjrGI+hGn5I5qSdmuD8vxnGsr4VkliiEzxnqPScHinj26Dv1NOEzB9GN6xO2RhEyes 4iIb8N2djaSpikbo+QAKVXvrKPETlwccI8i0reDiMtVF2V5kBR2hp1+sif3Y2saf2c6xAu OQcJdhNQLVxPZ2EkA0rqDG0mlCplD2nACXJDzLpVy4XP86/EExNon1rGAsFWWUj10fCTAP 1zfdT3Ds2WEgumIie3ia0Ns7SQNx95A+Kh90jVySu2s/drepNsW1jJG0znUDOg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1665596951; a=rsa-sha256; cv=none; b=NrwbWCJOA8TyLRIC8n/16B5SdW2IA3xN7GBDUaix4bnZDuhfgTz7ImXKwCH9OOrQOqZjgg u5FlH1jD3Qy76qHrPrdYAz4vW4jVvtGAfroT9szSgXRYYSuSMAjNHcNaiPH3O++i09ek1Y Zw7+kefhCIFaUaA4piXIEJDBAU0wz8uF+wj2NAk9CDo9BE0E9bBqrNTzN0WSHNzmcMLq9k Omvucd5Zz9hk0GdC18GqAF/AfwVy8w1TsmPstZGoaGSoWJl9ZIqdjq1FO9gEL04Xh7MGsn SrJmJZDaP1vyOH1A8O7b5Ojmy/QpNk3dWalsQfjYKeVD9grt8DfSGzHEqIhh/A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by khng: URL: https://cgit.FreeBSD.org/src/commit/?id=87fa64c569c54c2ec444ada699acde2ada696d97 commit 87fa64c569c54c2ec444ada699acde2ada696d97 Author: Ka Ho Ng AuthorDate: 2022-10-12 17:47:59 +0000 Commit: Ka Ho Ng CommitDate: 2022-10-12 17:47:59 +0000 refcount.9: Update refcount_acquire(9) description after a67d540832b8 MFC after: 3 days Sponsored by: Juniper Networks, Inc. Reviewed by: kib, markj Differential Revision: https://reviews.freebsd.org/D36943 --- share/man/man9/refcount.9 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/share/man/man9/refcount.9 b/share/man/man9/refcount.9 index 9171062a70b6..0b5a26d6e3cd 100644 --- a/share/man/man9/refcount.9 +++ b/share/man/man9/refcount.9 @@ -32,7 +32,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 2, 2020 +.Dd October 12, 2022 .Dt REFCOUNT 9 .Os .Sh NAME @@ -48,7 +48,7 @@ .Fn refcount_init "volatile u_int *count" "u_int value" .Ft u_int .Fn refcount_load "volatile u_int *count" -.Ft void +.Ft u_int .Fn refcount_acquire "volatile u_int *count" .Ft bool .Fn refcount_acquire_checked "volatile u_int *count" @@ -91,6 +91,7 @@ qualifier. The .Fn refcount_acquire function is used to acquire a new reference. +It returns the counter value before the new reference was acquired. The caller is responsible for ensuring that it holds a valid reference while obtaining a new reference. For example,