From nobody Sat Jun 20 00:24:53 2026 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 4ghwFy2Xphz6hFFd for ; Sat, 20 Jun 2026 00:24:54 +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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ghwFx6zr6z3Hnp for ; Sat, 20 Jun 2026 00:24:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1781915094; 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; bh=LhWUSb8yJqF92UKxNN+Ec+IQm1zJ8wRvsGrAJttfMdY=; b=qVfTyhXPdw9cw9vu0hIyJHp8VXmfFA4w+TsrBxtm4FvK5ufjqR0fnbwPdwD6o5Mv69zNrg 2JBgklb7qeYIdOtbbqSKZoLbpYJVONamLMQb5ngRaiOVb2HQlNVn17RTdsO1LCgGKYQPyc FNC9yfSRKoJuieQTBkcYGo7Evbp+lUIThGtB3WnUKI0eKWIWj0dR+RQoy5h947gTas3H2a MPoobQ4NxNDv+9lectGTYyQli1Bh3hh6Fbw/ajKbWSPt81IEbHzZ4SeeB94W5MJuw72fUV FCOEjWrkmYHF0hlV29YeZHUOnKOljWTtPw525TKa8fIh9IdtZq5ujrSqTBOJjw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1781915094; a=rsa-sha256; cv=none; b=FmK/jFavZEzR/WN1mcrl7tDc/HfbeU2jLp6nGz60jbQV6mIotyfmuX66D4QgLLO9Yg5rbe Ir1nJ17CJazL4C+0bkQUMPzc1UmpBwZq2oCCLjf2OTl4CEokRx4EZwzL6typyA7ooTA4yh 4lCngR1ASo3clotyE82R06hvbUQfPCbhFt8L4G87rAd6n2gHlhEEOHTPH8xEHbXLpGplJb NBGqGNLJwLD2hK3TR793yHq/hXJwCRRgvUgmVBgCafBBWLuSx0KxRgDf0TRNGU3IDwinqO U9Ke83sMe00rFYzCR9uQ5pq/fKgHGVx7PCxedHd2+TViRW/r34zwTabzTbukzA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1781915094; 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; bh=LhWUSb8yJqF92UKxNN+Ec+IQm1zJ8wRvsGrAJttfMdY=; b=FY2Te6TL5Gv3U1lBJjFJojkWH5QmB8Zl0S5eIk5SXWbQkj168iTht8vbIDvX1R7x81Ulvk FA4XQC2MN8c4n9/Uvc1QpU4hK3lJoFzlnp+RuafKvPC7Gte/CZNrM1tA6ffwJog3/R2Ofv iZ8C+iJ0QhGaodxmCh4+P/myQsMoHdLE9HoC9aFthR0NK+4BatFTgZGna+tU3rUxyU3Aac EwQpFsHkBOoXsVEmvz5eY6ODCQk8oxOEzz+VoLqT1tKQgGUfX31LAxZaO+LXDNLdadmtiT dUv5MCG5qiYKpraaAO+pVetNRBT145pzjgtwoP4oUghrrjdA7yKzIV8/SoR+QA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4ghwFx5l6Jz174J for ; Sat, 20 Jun 2026 00:24:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2501e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 20 Jun 2026 00:24:53 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Faraz Vahedi From: Warner Losh Subject: git: e17fddce8978 - main - libc: Reorganise memory_order enumeration constants 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 List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e17fddce8978efbc70fc473425bad59b111f4b16 Auto-Submitted: auto-generated Date: Sat, 20 Jun 2026 00:24:53 +0000 Message-Id: <6a35ddd5.2501e.57e743ab@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=e17fddce8978efbc70fc473425bad59b111f4b16 commit e17fddce8978efbc70fc473425bad59b111f4b16 Author: Faraz Vahedi AuthorDate: 2026-05-01 17:49:27 +0000 Commit: Warner Losh CommitDate: 2026-06-20 00:23:28 +0000 libc: Reorganise memory_order enumeration constants Place the `memory_order` enumeration constants alongside the corresponding typedef under the ยง7.17.3 heading. The previous layout separated the fallback constant definitions from the enum, which could obscure their relationship. These fallbacks exist only to provide values when the compiler does not supply the builtins. The removed comment encoded implementation-specific assumptions about compiler-provided definitions and implied a relationship between Clang/GCC macros and fallback values. In practice, the fallback definitions exist solely to ensure the enumerators are defined when compiler intrinsics are absent, and do not depend on any particular numeric mapping. No functional change; this is a mere structural and clarity improvement. Signed-off-by: Faraz Vahedi Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/2185 --- sys/sys/stdatomic.h | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/sys/sys/stdatomic.h b/sys/sys/stdatomic.h index e6eb46cd6ef3..135001a1f82e 100644 --- a/sys/sys/stdatomic.h +++ b/sys/sys/stdatomic.h @@ -101,9 +101,10 @@ #endif /* - * Clang and recent GCC both provide predefined macros for the memory - * orderings. If we are using a compiler that doesn't define them, use the - * clang values - these will be ignored in the fallback path. + * 7.17.3 Order and consistency. + * + * The memory_order_* constants that denote the barrier behaviour of the + * atomic operations. */ #ifndef __ATOMIC_RELAXED @@ -125,13 +126,6 @@ #define __ATOMIC_SEQ_CST 5 #endif -/* - * 7.17.3 Order and consistency. - * - * The memory_order_* constants that denote the barrier behaviour of the - * atomic operations. - */ - typedef enum { memory_order_relaxed = __ATOMIC_RELAXED, memory_order_consume = __ATOMIC_CONSUME,