This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]