about summary refs log tree commit diff
path: root/nptl
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2020-11-21 11:40:46 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2020-11-25 10:43:18 -0300
commita52665818adb76df1563ae7aa45e74e92d9acd59 (patch)
tree4ca3bcd72b0d0f90157394a9436c32a3983579a3 /nptl
parenta2b9e1ec9cf02613ba40b132e52256a58a0fe64f (diff)
downloadglibc-a52665818adb76df1563ae7aa45e74e92d9acd59.tar.gz
glibc-a52665818adb76df1563ae7aa45e74e92d9acd59.tar.xz
glibc-a52665818adb76df1563ae7aa45e74e92d9acd59.zip
nptl: Remove _futex_clock_wait_bitset64
It can be replaced with a __futex_abstimed_wait64 call.

Checked on x86_64-linux-gnu and i686-linux-gnu.

Reviewed-by: Lukasz Majewski <lukma@denx.de>
Diffstat (limited to 'nptl')
-rw-r--r--nptl/pthread_mutex_timedlock.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/nptl/pthread_mutex_timedlock.c b/nptl/pthread_mutex_timedlock.c
index de88e9fc25..0ec47359be 100644
--- a/nptl/pthread_mutex_timedlock.c
+++ b/nptl/pthread_mutex_timedlock.c
@@ -265,12 +265,13 @@ __pthread_mutex_clocklock_common (pthread_mutex_t *mutex,
 	  assume_other_futex_waiters |= FUTEX_WAITERS;
 
 	  /* Block using the futex.  */
-	  int err = __futex_clock_wait_bitset64 (&mutex->__data.__lock,
+	  int err = __futex_abstimed_wait64 (
+	      (unsigned int *) &mutex->__data.__lock,
 	      oldval, clockid, abstime,
 	      PTHREAD_ROBUST_MUTEX_PSHARED (mutex));
 	  /* The futex call timed out.  */
-	  if (err == -ETIMEDOUT)
-	    return -err;
+	  if (err == ETIMEDOUT)
+	    return err;
 	  /* Reload current lock value.  */
 	  oldval = mutex->__data.__lock;
 	}