[PATCH] Optimize libc_lock_lock for MIPS XLP.
Chris Metcalf
cmetcalf@tilera.com
Tue Aug 14 19:33:00 GMT 2012
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
More information about the Libc-alpha
mailing list