mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:47:45 +00:00
LibPthread: Fix asserting futex return value
FUTEX_WAIT returns the number of threads woken (if any). Fixes #5032
This commit is contained in:
parent
efc091df81
commit
9943816e83
1 changed files with 2 additions and 2 deletions
|
@ -552,7 +552,7 @@ int pthread_cond_signal(pthread_cond_t* cond)
|
|||
u32 value = cond->previous + 1;
|
||||
cond->value = value;
|
||||
int rc = futex(&cond->value, FUTEX_WAKE, 1, nullptr, nullptr, 0);
|
||||
ASSERT(rc == 0);
|
||||
ASSERT(rc >= 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -561,7 +561,7 @@ int pthread_cond_broadcast(pthread_cond_t* cond)
|
|||
u32 value = cond->previous + 1;
|
||||
cond->value = value;
|
||||
int rc = futex(&cond->value, FUTEX_WAKE, INT32_MAX, nullptr, nullptr, 0);
|
||||
ASSERT(rc == 0);
|
||||
ASSERT(rc >= 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue