Re: [patch 1/3] mutex subsystem: trylock

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 29 Dec 2005, Ingo Molnar wrote:

> > I'd solve it like this instead (on top of your latest patches):
> 
> thanks, applied.
> 
> > +		"1: ldrex	%0, [%3]	\n"
> > +		"subs		%1, %0, #1	\n"
> > +		"strexeq	%2, %1, [%3]	\n"
> > +		"movlt		%0, #0		\n"
> > +		"cmpeq		%2, #0		\n"
> > +		"bgt		1b		\n"
> 
> so we are back to what is in essence a cmpxchg implementation?

A limited cmpxchg.  Using the generic cmpxchg for this would need either 
9 or 10 instructions instead of 6.


Nicolas
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux