aboutsummaryrefslogtreecommitdiffstats
path: root/libc/bionic/pthread_mutex.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libc/bionic/pthread_mutex.cpp')
-rw-r--r--libc/bionic/pthread_mutex.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libc/bionic/pthread_mutex.cpp b/libc/bionic/pthread_mutex.cpp
index 1010f11d4..4a11747c3 100644
--- a/libc/bionic/pthread_mutex.cpp
+++ b/libc/bionic/pthread_mutex.cpp
@@ -800,7 +800,7 @@ int pthread_mutex_lock_timeout_np_impl(pthread_mutex_t *mutex, unsigned msecs)
* thread.
*/
if (MUTEX_STATE_BITS_IS_LOCKED_CONTENDED(mvalue)) {
- if (__futex_wait_ex(&mutex->value, shared, mvalue, &ts) == ETIMEDOUT) {
+ if (__futex_wait_ex(&mutex->value, shared, mvalue, &ts) == (-ETIMEDOUT)) {
return EBUSY;
}
mvalue = mutex->value;