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

Tulio Magno Quites Machado Filho tuliom@linux.vnet.ibm.com
Tue May 30 21:00:00 GMT 2017


Stefan Liebler <stli@linux.vnet.ibm.com> writes:

> On 04/06/2017 04:00 PM, Torvald Riegel wrote:
>> Otherwise, this patch looks good to me.
> Thanks for review. Here is an updated patch. I've changed the comments 
> and added the POSIX requirement in pthread_spin_trylock.
>
> @architecture maintainers:
> I've added defines of ATOMIC_EXCHANGE_USES_CAS in the architecture 
> specific atomic-machine.h files.
> See comment in include/atomic.h:
> /* ATOMIC_EXCHANGE_USES_CAS is equal to 1 if atomic_exchange operations
>     are implemented based on a CAS loop; otherwise, this is 0 and we assume
>     that the atomic_exchange operations could provide better performance
>     than a CAS loop.  */
>
> Can review the definition to 0 or 1 in the atomic-machine.h file of your 
> architecture, please?

The values look good for powerpc32 and powerpc64.

-- 
Tulio Magno



More information about the Libc-alpha mailing list