From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5B7B2427E3; Mon, 20 Mar 2023 17:22:04 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4A53B410D0; Mon, 20 Mar 2023 17:22:04 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 2A36A40A80 for ; Mon, 20 Mar 2023 17:22:03 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 79A8C20FAEE0; Mon, 20 Mar 2023 09:22:02 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 79A8C20FAEE0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1679329322; bh=1cU+S6P/5+5UrtwPKzuYihb2+P+NDc/UMBSMyqEDB8s=; h=From:To:Cc:Subject:Date:From; b=EG2hHwYXfM0xY5LDNKodSYF/e7/UUvdBP4L8Y3TSSTBhNgNIQacqvjIa8QiT15kGh Rtozv7bJ3IWF3Q9nTtWUZYNILKJUmNS3tE03lkrPahyve8cIrD66l7nC5vUfjTn0a2 7+iMGUAdcxA9vS0dUj5e7FDfYYW/2Bm31NPArwog= From: Tyler Retzlaff To: dev@dpdk.org Cc: thomas@monjalon.net, Tyler Retzlaff Subject: [PATCH] devtools: stop compiler atomics with no C11 equivalent Date: Mon, 20 Mar 2023 09:22:01 -0700 Message-Id: <1679329321-26073-1-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Refrain from using compiler __atomic_{add,and,nand,or,sub,xor}_fetch() to ease future adoption of C11 standard atomics. Signed-off-by: Tyler Retzlaff --- devtools/checkpatches.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh index 1dee094..1ed6d51 100755 --- a/devtools/checkpatches.sh +++ b/devtools/checkpatches.sh @@ -119,6 +119,14 @@ check_forbidden_additions() { # -f $(dirname $(readlink -f $0))/check-forbidden-tokens.awk \ "$1" || res=1 + # refrain from using compiler __atomic_{add,and,nand,or,sub,xor}_fetch() + awk -v FOLDERS="lib drivers app examples" \ + -v EXPRESSIONS="__atomic_(add|and|nand|or|sub|xor)_fetch\\\(" \ + -v RET_ON_FAIL=1 \ + -v MESSAGE='Using __atomic_{add,and,nand,or,sub,xor}_fetch' \ + -f $(dirname $(readlink -f $0))/check-forbidden-tokens.awk \ + "$1" || res=1 + # forbid use of __reserved which is a reserved keyword in Windows system headers awk -v FOLDERS="lib drivers app examples" \ -v EXPRESSIONS='\\<__reserved\\>' \ -- 1.8.3.1