fix lost signals in cond vars
authorRich Felker <dalias@aerifal.cx>
Mon, 26 Sep 2011 16:54:28 +0000 (12:54 -0400)
committerRich Felker <dalias@aerifal.cx>
Mon, 26 Sep 2011 16:54:28 +0000 (12:54 -0400)
due to moving waiters from the cond var to the mutex in bcast, these
waiters upon wakeup would steal slots in the count from newer waiters
that had not yet been signaled, preventing the signal function from
taking any action.

to solve the problem, we simply use two separate waiter counts, and so
that the original "total" waiters count is undisturbed by broadcast
and still available for signal.


No differences found