From nobody Sun Nov 09 00:38:18 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 4d3v6M0zv9z6FtHX; Sun, 09 Nov 2025 00:38:19 +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 4d3v6M0Sl2z3SrG; Sun, 09 Nov 2025 00:38:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762648699; 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=weoxs7bztg5JvcWyTJZZigcc3XL5DPIq8Xmw8d2g/Sc=; b=vX1Z09zFJdtXuyFBKBfEwQdBqUSPZZdFHRp2VZEuL4D1ZqQgkvtNF0DlB62mJd1gNPg1Bt jAr46a3jr2nij/tyxeXab/DJSqsmFFSQreoEndO1XKd4JqXNccsd7R/hViM8KZAhFT4MbX 4JB1z/5mzqY5dlDgrz/Aoq5hUUZRgotbUDElP9fMILWwP9/AnqiMCq2vbH0qW1u0lJXZ8F L2UDm0iYZF0MycA8FYXc8pgd2kcmxpHzcaHs6Xa5uTJISFM8JuTUkWf3w8Pl/CGk/xQH2O rzzPyZmR19a5GnmD5oA4yref3r45TiFv58q3bKNGyFXWsBnL7IIvUKsOv16Nlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762648699; 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=weoxs7bztg5JvcWyTJZZigcc3XL5DPIq8Xmw8d2g/Sc=; b=cSsk6YTlJPzrTXGoab5VrPvAnNeBZxL9S5EQ5d40I8LJVMzvaKx0PnzSkalKxR3mEOCUqD /qjU3HUGU8GVqXZZXiLkUywiP+J1A84+a2wFGlvq/BxDaeQpkDSBJGVivWXTIc1S4MXr3v ECICcKCwyl3jso+us5oW51b+pUkm5XkuWItzhSziAj02+HD/AME09gyhDfLQgbgN9MVbpc d3ZLMSbyXhV0xnO361Q1vAEAZBVB9yj5If9/DYdZzG8c06KUKEQN2wnlaeBaNH/Lm8VJOd 77cKbWoH5aAbDn3VaStZumK5yLpeoTxnmogr3IROXbfW9XGaeoySEVj+laLJDA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762648699; a=rsa-sha256; cv=none; b=hNl8LSyzhRXIbUcPIMrx+e4L24H6k6g91rlMOhEvwwv1os8gC1z0Gu+mYFv9rFjyk7y59V 5JO0+PkUjvtgM9uvGWVMtIbgzr3fHTkGgLQVvnJ2W1Ex3YVsVIe5aE7PIT+vjpeKd89KPD EzI1iIvdUgchYYJnGf4U5BTyLVzc2sO7WyfL5/Kl1edzh6VxMj+5tUl13YmOnFWFh1Y/pb GRjg6T5SYK+8Ly4YrZSa+/jyOC89mCcUUMq6PhjdeuPdB7d0PIopQEUwSksZQPo99RR/Zc N9LWRXgn7eVVZG70s/fj/JUzLZWuq7t1R9StW2eHDys36OHNjG9tNp6aHOuPmQ== 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 4d3v6L6wwGz17Dg; Sun, 09 Nov 2025 00:38:18 +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 5A90cIid097676; Sun, 9 Nov 2025 00:38:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5A90cIiF097673; Sun, 9 Nov 2025 00:38:18 GMT (envelope-from git) Date: Sun, 9 Nov 2025 00:38:18 GMT Message-Id: <202511090038.5A90cIiF097673@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: ed278aabc26c - stable/14 - 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/14 X-Git-Reftype: branch X-Git-Commit: ed278aabc26c218d842837b86a7ab332c95a9e95 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=ed278aabc26c218d842837b86a7ab332c95a9e95 commit ed278aabc26c218d842837b86a7ab332c95a9e95 Author: Konstantin Belousov AuthorDate: 2025-10-05 08:39:32 +0000 Commit: Konstantin Belousov CommitDate: 2025-11-09 00:37:05 +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 df24cd4a4d2b..19ab7e0fbdbd 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