On 26/03/20 20:58, Richard Henderson wrote:
>> +
>> +#ifndef atomic_fetch_add
>>  #define atomic_fetch_add(ptr, n) __atomic_fetch_add(ptr, n, 
>> __ATOMIC_SEQ_CST)
>>  #define atomic_fetch_sub(ptr, n) __atomic_fetch_sub(ptr, n, 
>> __ATOMIC_SEQ_CST)
>>  #define atomic_fetch_and(ptr, n) __atomic_fetch_and(ptr, n, 
>> __ATOMIC_SEQ_CST)
>>  #define atomic_fetch_or(ptr, n)  __atomic_fetch_or(ptr, n, __ATOMIC_SEQ_CST)
>>  #define atomic_fetch_xor(ptr, n) __atomic_fetch_xor(ptr, n, 
>> __ATOMIC_SEQ_CST)
>> +#endif
> Do we really get sequential consistency from <stdatomic.h>?

Yes, it's the default value (to pass a memory order you need
atomic_fetch_*_explicit).

Paolo

> Should we not in fact #undef as a workaround instead?


Reply via email to