From: David Marchand <david.marchand@redhat.com>
To: dev@dpdk.org
Cc: thomas@monjalon.net, roretzla@linux.microsoft.com
Subject: [PATCH] devtools: extend check on compiler builtin atomics
Date: Tue, 17 Oct 2023 13:31:25 +0200 [thread overview]
Message-ID: <20231017113125.2990147-1-david.marchand@redhat.com> (raw)
rte_memory_order_* should be used when calling the new stdatomic API.
Add a check on __ATOMIC_* tokens.
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
devtools/checkpatches.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh
index 2635923e14..7740152643 100755
--- a/devtools/checkpatches.sh
+++ b/devtools/checkpatches.sh
@@ -113,9 +113,9 @@ check_forbidden_additions() { # <patch>
# refrain from using compiler __atomic_xxx builtins
awk -v FOLDERS="lib drivers app examples" \
- -v EXPRESSIONS="__atomic_.*\\\(" \
+ -v EXPRESSIONS="__atomic_.*\\\( __ATOMIC_(RELAXED|CONSUME|ACQUIRE|RELEASE|ACQ_REL|SEQ_CST)" \
-v RET_ON_FAIL=1 \
- -v MESSAGE='Using __atomic_xxx built-ins, prefer rte_atomic_xxx' \
+ -v MESSAGE='Using __atomic_xxx/__ATOMIC_XXX built-ins, prefer rte_atomic_xxx' \
-f $(dirname $(readlink -f $0))/check-forbidden-tokens.awk \
"$1" || res=1
--
2.41.0
next reply other threads:[~2023-10-17 11:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-17 11:31 David Marchand [this message]
2023-10-17 11:34 ` Tyler Retzlaff
2023-10-19 7:08 ` David Marchand
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231017113125.2990147-1-david.marchand@redhat.com \
--to=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=roretzla@linux.microsoft.com \
--cc=thomas@monjalon.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).