1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 15:37:46 +00:00

LibPthread: Fix some assertions

This commit is contained in:
Sergey Bugaev 2021-07-06 14:39:46 +03:00 committed by Andreas Kling
parent 78f5c4a4c2
commit 5aa629717e
2 changed files with 2 additions and 2 deletions

View file

@ -128,6 +128,6 @@ int pthread_cond_broadcast(pthread_cond_t* cond)
VERIFY(mutex); VERIFY(mutex);
int rc = futex(&cond->value, FUTEX_REQUEUE, 1, nullptr, &mutex->lock, INT_MAX); int rc = futex(&cond->value, FUTEX_REQUEUE, 1, nullptr, &mutex->lock, INT_MAX);
VERIFY(rc == 0); VERIFY(rc >= 0);
return 0; return 0;
} }

View file

@ -77,7 +77,7 @@ int sem_post(sem_t* sem)
if (!(value & POST_WAKES)) [[likely]] if (!(value & POST_WAKES)) [[likely]]
return 0; return 0;
int rc = futex_wake(&sem->value, 1); int rc = futex_wake(&sem->value, 1);
VERIFY(rc == 0); VERIFY(rc >= 0);
return 0; return 0;
} }