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.
This commit is contained in:
@@ -70,6 +70,7 @@ struct __timer {
|
||||
#define _c_clock __u.__i[4]
|
||||
#define _c_lock __u.__i[5]
|
||||
#define _c_lockwait __u.__i[6]
|
||||
#define _c_waiters2 __u.__i[7]
|
||||
#define _rw_lock __u.__i[0]
|
||||
#define _rw_waiters __u.__i[1]
|
||||
#define _b_inst __u.__p[0]
|
||||
|
||||
Reference in New Issue
Block a user