From nobody Tue Oct 11 22:35:34 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 4Mn9bW05dSz4fZWb; Tue, 11 Oct 2022 22:35:35 +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 4Mn9bV6gKyz3ZW4; Tue, 11 Oct 2022 22:35:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1665527734; 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=p3InQiWllyvOzcanDvxe6QbmQXl8bO+AvozTDwLT/Hs=; b=y2Fiyhs5zihJoD8C5D+ArpYG3dzh/Fi7NzGps4quUftr/uUeZxaelVqqUk3wQuk3Lf+umt blOeIOZp+0eEIZjV7WQLD1MWdtgyo8kEedON1/XqiuJLPa4F2yZtJJLpatVtS7KKANwCG6 j+GpUNpK7a5OzmZMkgg305XTffybWAxYttorjvVJhHuSmMGKTLsPEAkF1o04j2GIWi3GCW L4tjOSFP+nfScHJKv5udYzMHEgIxqfn5Lutyjzu2Gf2Jg1AlRf1JpD3Y/Ur80EZ2mAnF2V XA1kJPIVphV7P+IA77PF5WtAd+cTIbEpq2bQLWJbPtNKzpcmIepttgk9NxN01Q== 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 4Mn9bV5TMcz16Mh; Tue, 11 Oct 2022 22:35:34 +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 29BMZYkq048752; Tue, 11 Oct 2022 22:35:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 29BMZY2l048751; Tue, 11 Oct 2022 22:35:34 GMT (envelope-from git) Date: Tue, 11 Oct 2022 22:35:34 GMT Message-Id: <202210112235.29BMZY2l048751@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 301a27dc6546 - main - atomic: Style 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 301a27dc65463fc9a909835863ff5566623f6ef2 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1665527734; 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=p3InQiWllyvOzcanDvxe6QbmQXl8bO+AvozTDwLT/Hs=; b=FlVSZ+/Sc/g2ERyW3yucWei53QIHkcqhHJsCfSgzBfT99HXib7GzssdJ5euf/yDNm+IBr0 QwlOzkd7qX51e6jwViEvHHf8Sd984bZnpsc1dw/jRD+ImFShToiTSVIPGWTWwBnqWObC4x lm+Ilm59RDscDKD1wZUe3MtXqmeNl9BgwTbiYEqvOh2XOByXKpzHx4yHjd+10LqmKzHBxP O1agY3lk0zQZ94O/kvmgZkJbiIgFoXGQoRV8ikmxpKEt0s5/ivA2IAz21YG5iBCznhCNYM QbyhcJ8PPHn15jl9B1BolPPDt4+gGldLZdcfQvZbSe2g4bnMDUJkkgvY5GHnqA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1665527734; a=rsa-sha256; cv=none; b=iSgWAaL7aRW3WwEi40v3YmPcU7oP120kB17TG4UfHxUdecCQnXhBoXQn0LwHM7l4PI7yjB 9Lmhd7KWSlyO1Kq+Ys6ruocutYOGOcrrbAQdkQzyd8qGytOMKK0GkOcoLZal4D1AlzkhnB VEu0J2EycNYNdNHfAlcp/RanhfmAoMpF8h/W3/rJhkrPTM6MPyyDfQhmscJWuetBesK6ik 3aoIqyJ9Y+1MHh0/wLGdOpNDAsGUjpo16JUqqRg0zA6CfiKkF0X8aYtiIc9ulXqwmPF4H2 Q/F4oZYa0JUXlEGfCxq4yn9SBRIJy7MqNbCMXlZIVGLtJZ6idWpT5/Kgd8K0ag== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=301a27dc65463fc9a909835863ff5566623f6ef2 commit 301a27dc65463fc9a909835863ff5566623f6ef2 Author: Mark Johnston AuthorDate: 2022-10-11 14:54:36 +0000 Commit: Mark Johnston CommitDate: 2022-10-11 22:19:08 +0000 atomic: Style Fixes: 30253da1a982 ("atomic: Add some type checking to plain atomic_load/store helpers") MFC after: 1 week --- sys/sys/atomic_common.h | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/sys/sys/atomic_common.h b/sys/sys/atomic_common.h index 04281ae8f2ed..a7b0b50512dc 100644 --- a/sys/sys/atomic_common.h +++ b/sys/sys/atomic_common.h @@ -81,15 +81,21 @@ #define __atomic_load_generic(p, t, ut, n) \ _Generic(*(p), \ - t: __atomic_load_ ## n ## _relaxed(p), ut: __atomic_load_ ## n ## _relaxed(p)) + t: __atomic_load_ ## n ## _relaxed(p), \ + ut: __atomic_load_ ## n ## _relaxed(p)) #define __atomic_store_generic(p, v, t, ut, n) \ _Generic(*(p), \ - t: __atomic_store_ ## n ## _relaxed(p, v), ut: __atomic_store_ ## n ## _relaxed(p, v)) + t: __atomic_store_ ## n ## _relaxed(p, v), \ + ut: __atomic_store_ ## n ## _relaxed(p, v)) #else -#define atomic_load_bool(p) __atomic_load_bool_relaxed(p) -#define atomic_store_bool(p, v) __atomic_store_bool_relaxed(p, v) -#define __atomic_load_generic(p, t, ut, n) __atomic_load_ ## n ## _relaxed(p) -#define __atomic_store_generic(p, v, t, ut, n) __atomic_store_ ## n ## _relaxed(p, v) +#define atomic_load_bool(p) \ + __atomic_load_bool_relaxed(p) +#define atomic_store_bool(p, v) \ + __atomic_store_bool_relaxed(p, v) +#define __atomic_load_generic(p, t, ut, n) \ + __atomic_load_ ## n ## _relaxed(p) +#define __atomic_store_generic(p, v, t, ut, n) \ + __atomic_store_ ## n ## _relaxed(p, v) #endif #define atomic_load_char(p) __atomic_load_generic(p, char, u_char, char) @@ -134,4 +140,4 @@ #define atomic_interrupt_fence() __compiler_membar() -#endif +#endif /* !_SYS_ATOMIC_COMMON_H_ */