[dpdk-dev] [PATCH v6] eal/x86: add 128-bit atomic compare exchange

Eads, Gage gage.eads at intel.com
Thu Apr 4 14:22:54 CEST 2019


> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas at monjalon.net]
> Sent: Thursday, April 4, 2019 7:18 AM
> To: Eads, Gage <gage.eads at intel.com>; Yigit, Ferruh
> <ferruh.yigit at intel.com>
> Cc: Shahaf Shuler <shahafs at mellanox.com>; Matan Azrad
> <matan at mellanox.com>; Yongseok Koh <yskoh at mellanox.com>;
> dev at dpdk.org; olivier.matz at 6wind.com; arybchenko at solarflare.com;
> Richardson, Bruce <bruce.richardson at intel.com>; Ananyev, Konstantin
> <konstantin.ananyev at intel.com>; gavin.hu at arm.com;
> Honnappa.Nagarahalli at arm.com; nd at arm.com;
> chaozhu at linux.vnet.ibm.com; jerinj at marvell.com;
> hemant.agrawal at nxp.com
> Subject: Re: [dpdk-dev] [PATCH v6] eal/x86: add 128-bit atomic compare
> exchange
> 
> 04/04/2019 14:14, Eads, Gage:
> > From: Thomas Monjalon [mailto:thomas at monjalon.net]
> > > 04/04/2019 14:08, Thomas Monjalon:
> > > > 04/04/2019 13:47, Ferruh Yigit:
> > > > > .../dpdk/x86_64-native-linuxapp-gcc/include/rte_atomic_64.h:223:3:
> > > > > error: ISO C does not support ‘__int128’ types [-Werror=pedantic]
> > > >
> > > > We can try this kind of workaround (disable pedantic locally):
> > > >
> > >
> https://github.com/HowardHinnant/date/pull/38/commits/177032852d5b46
> > > 14
> > > > 112ca1ab3ef42d6b41824816
> > >
> > > Or better:
> > > __extension__ typedef __int128 int128;
> > >
> >
> > Taking that one step further -- RTE_STD_C11 evaluates to __extension__
> (when the STD C version is sufficiently old).
> 
> I don't think __int128 is part of C11. Is it?

You're right, this is a compiler extension. Using '__extension__' makes more sense.


More information about the dev mailing list