On Fri, Mar 27, 2009 at 10:07:02AM -0700, David Daney wrote: > If the lock is not acquired and has to spin *and* the second attempt > to acquire the lock fails, the delay time is not masked by the ticket > range mask. If the ticket number wraps around to zero, the result is > that the lock sampling delay is essentially infinite (due to casting > -1 to an unsigned int). > > The fix: Always mask the difference between my_ticket and the current > ticket value before calculating the delay. Thanks, applied! Ralf