aboutsummaryrefslogtreecommitdiff
path: root/src/codegen/c.zig
diff options
context:
space:
mode:
authorIgor Anić <igor.anic@gmail.com>2022-11-17 20:58:45 +0100
committerIgor Anić <igor.anic@gmail.com>2022-11-17 20:58:45 +0100
commitf229b740999b58432dc49e3aa412fac14e3781f3 (patch)
tree5d457a6c2468723a9be5102ea6567f9cecc7e0b5 /src/codegen/c.zig
parent88a0f3d0e55691aa2b341cfa6efc53f2540b22f9 (diff)
downloadzig-f229b740999b58432dc49e3aa412fac14e3781f3.tar.gz
zig-f229b740999b58432dc49e3aa412fac14e3781f3.zip
stdlib: fix condition variable broadcast FutexImpl
fixes #12877 Current implementation (before this fix) observes number of waiters when broadcast occurs and then makes that number of wakeups. If we have multiple threads waiting for wakeup which immediately go into wait if wakeup is not for that thread (as described in the issue). The same thread can get multiple wakeups while some got none. That is not consistent with documented behavior for condition variable broadcast: `Unblocks all threads currently blocked in a call to wait() or timedWait() with a given Mutex.`. This fix ensures that the thread waiting on futext is woken up on futex wake.
Diffstat (limited to 'src/codegen/c.zig')
0 files changed, 0 insertions, 0 deletions