This is the mail archive of the libc-ports@sources.redhat.com mailing list for the libc-ports 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] Optimize libc_lock_lock for MIPS XLP.


On 8/14/2012 12:00 AM, Maxim Kuvyrkov wrote:
> +   atomic_compared_and_exchange_acq take the same time to execute.

Typo.

> +  if (__result >= 2)							\
> +    __result = (atomic_exchange_acq (__futex, 2) != 0);			\

Why not just return the old value in memory here (i.e. omit the "!= 0"), as
you do with the exchange_and_add above?  That seems more parallel in
structure, and also more efficient.

-- 
Chris Metcalf, Tilera Corp.
http://www.tilera.com


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