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 B17554280D; Wed, 22 Mar 2023 19:25:15 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6DC4F40E09; Wed, 22 Mar 2023 19:25:15 +0100 (CET) Received: from smartserver.smartsharesystems.com (smartserver.smartsharesystems.com [77.243.40.215]) by mails.dpdk.org (Postfix) with ESMTP id ADFDB40A84 for ; Wed, 22 Mar 2023 19:25:13 +0100 (CET) Content-class: urn:content-classes:message Subject: RE: [PATCH] devtools: stop compiler atomics with no C11 equivalent MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Date: Wed, 22 Mar 2023 19:25:09 +0100 Message-ID: <98CBD80474FA8B44BF855DF32C47DC35D877EA@smartserver.smartshare.dk> X-MimeOLE: Produced By Microsoft Exchange V6.5 In-Reply-To: <20230322180819.GB28785@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PATCH] devtools: stop compiler atomics with no C11 equivalent Thread-Index: Adlc6UtV9fqmyR3RQoKZRuC20iPqpAAAcKpA References: <1679329321-26073-1-git-send-email-roretzla@linux.microsoft.com> <20230322180819.GB28785@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> From: =?iso-8859-1?Q?Morten_Br=F8rup?= To: "Tyler Retzlaff" , Cc: , , 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 > From: Tyler Retzlaff [mailto:roretzla@linux.microsoft.com] > Sent: Wednesday, 22 March 2023 19.08 >=20 > adding a few more people to cc for attention >=20 > On Mon, Mar 20, 2023 at 09:22:01AM -0700, Tyler Retzlaff wrote: > > 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=3D1 > > > > + # refrain from using compiler > __atomic_{add,and,nand,or,sub,xor}_fetch() > > + awk -v FOLDERS=3D"lib drivers app examples" \ > > + -v > EXPRESSIONS=3D"__atomic_(add|and|nand|or|sub|xor)_fetch\\\(" \ > > + -v RET_ON_FAIL=3D1 \ > > + -v MESSAGE=3D'Using __atomic_{add,and,nand,or,sub,xor}_fetch' > \ Suggest that you expand the error message with a solution for the = developer: "... use __atomic_fetch_op() instead of __atomic_op_fetch()" > > + -f $(dirname $(readlink -f $0))/check-forbidden-tokens.awk > \ > > + "$1" || res=3D1 > > + > > # forbid use of __reserved which is a reserved keyword in Windows > system headers > > awk -v FOLDERS=3D"lib drivers app examples" \ > > -v EXPRESSIONS=3D'\\<__reserved\\>' \ > > -- > > 1.8.3.1