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 2227B428C1; Tue, 4 Apr 2023 02:21:47 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F1C3F40EE3; Tue, 4 Apr 2023 02:21:46 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 17A404067E for ; Tue, 4 Apr 2023 02:21:45 +0200 (CEST) Received: by linux.microsoft.com (Postfix, from userid 1086) id 311FA210DC5D; Mon, 3 Apr 2023 17:21:44 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 311FA210DC5D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1680567704; bh=le3dUsbPb769z6z4cCDtkxtwRBj7bjOY0nzZhrPi7pk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WtXZYYKaz/Ql7b8DbNMvafmHHSHuUEIZZuya/UxtYbsVJWPTx4H0WksO3/LRiWJr7 xPpM4iqm/QYs8m5wIeUdDf5p0uCe7wcrtoaUuifcVqS04VqPju7kQCIvIZoR/VCQTd m+8duQyBYdM/mHjfIED45sPXTRYiWnvoNYCvx7bY= From: Tyler Retzlaff To: dev@dpdk.org Cc: david.marchand@redhat.com, thomas@monjalon.net, mb@smartsharesystems.com, Honnappa.Nagarahalli@arm.com, Tyler Retzlaff Subject: [PATCH v2] devtools: stop compiler atomics with no C11 equivalent Date: Mon, 3 Apr 2023 17:21:38 -0700 Message-Id: <1680567698-7874-1-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1679329321-26073-1-git-send-email-roretzla@linux.microsoft.com> References: <1679329321-26073-1-git-send-email-roretzla@linux.microsoft.com> 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 a07bbc8..1b6841b 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_op_fetch use __atomic_fetch_op instead' \ + -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