commit | 1fa05210100caefc8546746e08358d81739f4b41 | [log] [tgz] |
---|---|---|
author | Rich Felker <dalias@aerifal.cx> | Mon Sep 26 12:54:28 2011 -0400 |
committer | Rich Felker <dalias@aerifal.cx> | Mon Sep 26 12:54:28 2011 -0400 |
tree | f54a70f0e4c82aa215307a3b2f4eb026115b6311 | |
parent | fd142e5ec44aaafffbb8bb4ea41c4288d3fa937a [diff] |
fix lost signals in cond vars 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.