mirror of
https://github.com/SerenityOS/serenity.git
synced 2026-11-07 04:29:30 -10:00
LibC: Fix pthread_cond_broadcast() waking only one thread
This commit is contained in:
1 parent
0359e8848a
commit
760b9186a5
1 file changed
+1
-1
@@ -155,7 +155,7 @@ int pthread_cond_broadcast(pthread_cond_t* cond)
|
||||
pthread_mutex_t* mutex = AK::atomic_load(&cond->mutex, AK::memory_order_relaxed);
|
||||
VERIFY(mutex);
|
||||
|
||||
int rc = futex(&cond->value, FUTEX_REQUEUE | FUTEX_PRIVATE_FLAG, 1, nullptr, &mutex->lock, INT_MAX);
|
||||
int rc = futex(&cond->value, FUTEX_REQUEUE | FUTEX_PRIVATE_FLAG, -1, nullptr, &mutex->lock, INT_MAX);
|
||||
VERIFY(rc >= 0);
|
||||
return 0;
|
||||
}
|
||||
Reference in new issue
Block a user