On Sat, 24 May 2008 12:19:34 -0700
Daniel Walker <dwalker@mvista.com> wrote:
nope. Don't look at the release path... look at the acquire path.
If a thread sees the futex is free, it'll take it, without even going
to the kernel at all. So you have the situation where the kernel spends
a lot of time finding the "perfect" candidate to wake up, but kaboom
some other thread just happens to try to get the mutex between the
wakeup and the acquire of the wakee.. and just "steal" the lock.
--