[PATCH 1/2] Optimize generic spinlock code and use C11 like atomic macros.

Stefan Liebler stli@linux.vnet.ibm.com
Mon Apr 10 12:00:00 GMT 2017


On 04/10/2017 10:17 AM, Andreas Schwab wrote:
> On Apr 07 2017, Stefan Liebler <stli@linux.vnet.ibm.com> wrote:
>
>> /* ATOMIC_EXCHANGE_USES_CAS is equal to 1 if atomic_exchange operations
>
> Why 1 exactly, and not just non-zero?
>
> Andreas.
>

This points out that there is only a true/false choice and
all architectures have to define it.

__HAVE_64B_ATOMICS is used in the same way.
/* This is equal to 1 iff the architecture supports 64b atomic 
operations.  */

Bye
Stefan



More information about the Libc-alpha mailing list