From a3e1eed100556a2c444e1258ddb8a17d318a45a9 Mon Sep 17 00:00:00 2001 From: 4lDO2 <4lDO2@protonmail.com> Date: Sun, 30 Apr 2023 17:30:56 +0200 Subject: [PATCH] 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. --- src/sync/mutex.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sync/mutex.rs b/src/sync/mutex.rs index 14617919e6..b4e5b1e998 100644 --- a/src/sync/mutex.rs +++ b/src/sync/mutex.rs @@ -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); } }