[PATCH v2 3/5] eal: add atomic bit operations

Mattias Rönnblom hofors at lysator.liu.se
Mon Aug 12 14:00:10 CEST 2024


On 2024-08-12 13:19, Jack Bond-Preston wrote:
> On 09/08/2024 10:58, Mattias Rönnblom wrote:
>> <snip>
>> +
>> +#define __RTE_GEN_BIT_ATOMIC_OPS(size)            \
>> +    __RTE_GEN_BIT_ATOMIC_TEST(size)            \
>> +    __RTE_GEN_BIT_ATOMIC_SET(size)            \
>> +    __RTE_GEN_BIT_ATOMIC_CLEAR(size)        \
>> +    __RTE_GEN_BIT_ATOMIC_ASSIGN(size)        \
>> +    __RTE_GEN_BIT_ATOMIC_TEST_AND_SET(size)        \
>> +    __RTE_GEN_BIT_ATOMIC_TEST_AND_CLEAR(size)    \
>> +    __RTE_GEN_BIT_ATOMIC_TEST_AND_ASSIGN(size)    \
>> +    __RTE_GEN_BIT_ATOMIC_FLIP(size)
>> +
>> +__RTE_GEN_BIT_ATOMIC_OPS(32)
>> +__RTE_GEN_BIT_ATOMIC_OPS(64)
> 
> For the non-atomic operations, the arguments family and qualifier were 
> added in the initial commit, and unused until the 
> volatile-support-adding commit. Perhaps the atomic equivalents should be 
> the same? (ie. add the family and qualifier arguments in this patch and 
> don't use them until patch 5/5.
> 

Sounds like a good idea.

>> +
>>   /*------------------------ 32-bit relaxed operations 
>> ------------------------*/
>>   /**
>> <snip>


More information about the dev mailing list