Wake all when unlocking internal mutexes.

This is because we don't yet count the number of waiting threads,
instead just flagging where or not there are any waiters.
This commit is contained in:
4lDO2
2023-04-30 17:30:56 +02:00
parent 7bcfa9cfd9
commit a3e1eed100
+1 -1
View File
@@ -45,7 +45,7 @@ pub(crate) unsafe fn manual_lock_generic(word: &AtomicInt) {
}
pub(crate) unsafe fn manual_unlock_generic(word: &AtomicInt) {
if word.swap(UNLOCKED, Ordering::Release) == WAITING {
crate::sync::futex_wake(word, 1);
crate::sync::futex_wake(word, i32::MAX);
}
}