On 11/01/2007 10:03 AM, Nick Piggin wrote:
[edited to show the resulting code]
If you really thought you might get long queues, you could figure out
how far back you are and use that to determine how long to wait before
testing the lock again. That cmpb could become a subb without adding
overhead to the fast path -- that would give you the queue length (or
its complement anyway.)
-