mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-07 20:31:04 +03:00
LibC: Fix pthread_cond_broadcast() waking only one thread
This commit is contained in:
parent
0359e8848a
commit
760b9186a5
Notes:
sideshowbarker
2024-07-18 00:41:35 +09:00
Author: https://github.com/LekKit Commit: https://github.com/SerenityOS/serenity/commit/760b9186a5 Pull-request: https://github.com/SerenityOS/serenity/pull/23669
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user