diff options
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/nptl/futex-internal.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sysdeps/nptl/futex-internal.h b/sysdeps/nptl/futex-internal.h index 1640da0ce8..9974477c48 100644 --- a/sysdeps/nptl/futex-internal.h +++ b/sysdeps/nptl/futex-internal.h @@ -420,19 +420,18 @@ static __always_inline int __futex_clocklock64 (int *futex, clockid_t clockid, const struct __timespec64 *abstime, int private) { - int err = 0; - if (__glibc_unlikely (atomic_compare_and_exchange_bool_acq (futex, 1, 0))) { while (atomic_exchange_acq (futex, 2) != 0) { + int err = 0; err = __futex_abstimed_wait64 ((unsigned int *) futex, 2, clockid, abstime, private); if (err == EINVAL || err == ETIMEDOUT || err == EOVERFLOW) - break; + return err; } } - return err; + return 0; } #endif /* futex-internal.h */ |