[PATCH 1/2] Optimize generic spinlock code and use C11 like atomic macros.
Stefan Liebler
stli@linux.vnet.ibm.com
Tue Apr 11 12:19:00 GMT 2017
On 04/11/2017 02:05 PM, Andreas Schwab wrote:
> On Apr 11 2017, Stefan Liebler <stli@linux.vnet.ibm.com> wrote:
>
>> It happened in the case of __HAVE_64B_ATOMICS.
>
> We shouldn't follow a bad example.
>
> Andreas.
>
Then I'll change the check to:
/* ATOMIC_EXCHANGE_USES_CAS is non-zero if atomic_exchange operations
are implemented based on a CAS loop; otherwise, this is zero and we
assume
that the atomic_exchange operations could provide better performance
than a CAS loop. */
#ifndef ATOMIC_EXCHANGE_USES_CAS
# error ATOMIC_EXCHANGE_USES_CAS has to be defined.
#endif
Bye
Stefan
More information about the Libc-alpha
mailing list