Parcourir la source

LibPthread: Fix some assertions

Sergey Bugaev il y a 4 ans
Parent
commit
5aa629717e

+ 1 - 1
Userland/Libraries/LibPthread/pthread_cond.cpp

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

+ 1 - 1
Userland/Libraries/LibPthread/semaphore.cpp

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