[dpdk-dev] [PATCH v4 4/4] eal/atomic: add wrapper for c11 atomics

Mattias Rönnblom mattias.ronnblom at ericsson.com
Wed May 13 21:25:21 CEST 2020


On 2020-05-12 20:20, Stephen Hemminger wrote:
> On Tue, May 12, 2020 at 4:03 pm, Phil Yang <phil.yang at arm.com> wrote:
>> parameter. Signed-off-by: Phil Yang <phil.yang at arm.com 
>> <mailto:phil.yang at arm.com>>
>
>
> What is the purpose of having rte_atomic at all?
> Is this level of indirection really helping?
>

To allow a different implementation than the GCC built-ins, for certain 
functions and architectures. To allow extensions (i.e. atomic functions 
that aren't GCC built-ins) in a clean way. To avoid using GCC built-ins 
directly, both for cosmetic reasons, and that it might cause problem for 
future compilers.





More information about the dev mailing list