From nobody Sun Nov 09 00:36:23 2025 X-Original-To: dev-commits-src-branches@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 4d3v480LnFz6FsdQ; Sun, 09 Nov 2025 00:36:24 +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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d3v474KtHz3RG1; Sun, 09 Nov 2025 00:36:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762648583; 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=z0Ank0679jPkmqdQeWxlrcTaeNTxWeqDl4k0J6q7yVc=; b=LsS6MKqZUl76hS200mVoHAdICGevnuMolZo/GC7SnIMH4ivJkRVLJbwJwzID8g+llvuJ3u a9VE5taqkFFYDPreu3w0Gb1zS42EOXqjyza25U8Eh8Clz7motOTCSkp6CUFCf7OZ05N51a au78ADReZcwXYt6FEbBZmLoy2h5fKnWPL4UWCYCOXIV0rmLrKjh3wf8oyLRxzfkNQ3eAcb nyBdsriQ/EPHFv9dKXqY14slXsnyEIc18weUNQ3gVIbYDTtoqebraiDV0Nl7vpiw8yH+PN DbdNblkOFIdxhO83LokPrXAt6XlIeO25GUiCvm/M+m6+9knKqtHiQiwNk2CElQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762648583; 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=z0Ank0679jPkmqdQeWxlrcTaeNTxWeqDl4k0J6q7yVc=; b=NwM/Pklkl6nkuCBCzILpugNYVt+tq0vEOITuVG+vt/VislXa8BYTBTfuvZRRqiqzzFHH96 hEFHRhX0aS6K8HwAQAY+G58FqpI7uyh253+EQrGBXNo+/zLUlO0rCcRn6Fk+aIWM9Aq7tl htQXFT0xgF/TNJ7dFRMS6UbSb4U04NC/zs9Xdo9u6MEqEWq9LdwGBjzzE7cjJI16fioDXX RU3IvDX2zftXU4QA6xue+mV7iiu4DvNMettE6pLmL0EnDjotJ3CuJGgG0LiBAu/MEC0Bu2 +Dvx6IV6Z50j/km0+rL1Gqk988Q+/Z8jbuVeBKTVnCHToJOydpAJBq0DaL35SQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762648583; a=rsa-sha256; cv=none; b=jOV8u1fO1Wrke2kISHbs6m+qvzvnyMYFv/Ttd7Ptaz8YKU0g9DMAaJPA2Lz9go6PU7spR/ 1RobG43YB1yjoH1i1V1Wqbkeg/onVww9giVFCKauTfG1ZDJivgchAxtYwwF/I5lwQKd/Nt PSra68S33eATfi2+3grFtH5iMmcSMNslQxns8CZfBOHVm+UEPRgOahPi3B3PMsJ88uLBIR Kxo2uDCAdihTBeZFu33wqpA4RFFs60VXj/ty1ZOXAb1jA8Z775DYDJZ71mCjrsEKNqMgNd EZd40vtFcFNq1WFfz0Gp0sB80kX53lA5ALPPxAtgnHb6WMhay6PWdOwAhUnHEg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4d3v473fs3z17wt; Sun, 09 Nov 2025 00:36:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5A90aNr1096921; Sun, 9 Nov 2025 00:36:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5A90aNUN096918; Sun, 9 Nov 2025 00:36:23 GMT (envelope-from git) Date: Sun, 9 Nov 2025 00:36:23 GMT Message-Id: <202511090036.5A90aNUN096918@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 21b0a62ebcdc - stable/15 - atomic.9: fix description of acquire and release List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 21b0a62ebcdcb5453a4d3ff824c8a827e1413e78 Auto-Submitted: auto-generated The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=21b0a62ebcdcb5453a4d3ff824c8a827e1413e78 commit 21b0a62ebcdcb5453a4d3ff824c8a827e1413e78 Author: Konstantin Belousov AuthorDate: 2025-10-05 08:39:32 +0000 Commit: Konstantin Belousov CommitDate: 2025-11-09 00:35:52 +0000 atomic.9: fix description of acquire and release (cherry picked from commit f26382dd72dfc710a8cc7159364a8166e22a4254) --- share/man/man9/atomic.9 | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/share/man/man9/atomic.9 b/share/man/man9/atomic.9 index c9133c6311a5..674959648330 100644 --- a/share/man/man9/atomic.9 +++ b/share/man/man9/atomic.9 @@ -182,35 +182,42 @@ This variant is the default. The second variant has acquire semantics, and the third variant has release semantics. .Pp -When an atomic operation has acquire semantics, the operation must have +An atomic operation can only have +.Em acquire +semantics if it performs a load +from memory. +When an atomic operation has acquire semantics, a load performed as +part of the operation must have completed before any subsequent load or store (by program order) is performed. Conversely, acquire semantics do not require that prior loads or stores have -completed before the atomic operation is performed. -An atomic operation can only have acquire semantics if it performs a load -from memory. +completed before a load from the atomic operation is performed. To denote acquire semantics, the suffix .Dq Li _acq is inserted into the function name immediately prior to the .Dq Li _ Ns Aq Fa type suffix. -For example, to subtract two integers ensuring that the subtraction is +For example, to subtract two integers ensuring that the load of +the value from memory is completed before any subsequent loads and stores are performed, use .Fn atomic_subtract_acq_int . .Pp +An atomic operation can only have +.Em release +semantics if it performs a store to memory. When an atomic operation has release semantics, all prior loads or stores -(by program order) must have completed before the operation is performed. -Conversely, release semantics do not require that the atomic operation must +(by program order) must have completed before a store executed as part of +the operation that is performed. +Conversely, release semantics do not require that a store from the atomic +operation must have completed before any subsequent load or store is performed. -An atomic operation can only have release semantics if it performs a store -to memory. To denote release semantics, the suffix .Dq Li _rel is inserted into the function name immediately prior to the .Dq Li _ Ns Aq Fa type suffix. For example, to add two long integers ensuring that all prior loads and -stores are completed before the addition is performed, use +stores are completed before the store of the result is performed, use .Fn atomic_add_rel_long . .Pp When a release operation by one thread