On Sun, Oct 12, 2008 at 07:47:32AM +0200, Nick Piggin wrote: > > Implement a more optimal mutex fastpath for powerpc, making use of acquire > and release barrier semantics. This takes the mutex lock+unlock benchmark > from 203 to 173 cycles on a G5. > > +static inline int > +__mutex_fastpath_trylock(atomic_t *count, int (*fail_fn)(atomic_t *)) > +{ > + if (likely(__mutex_cmpxchg_lock(count, 1, 0) == 1)) > + return 1;
Oops, I must have sent the wrong version. This needs a return 0 here. > +} _______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev