diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2020-11-23 15:28:57 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2020-11-25 10:40:59 -0300 |
commit | 9e92278ffad441daf588ff1ff5bd8094aa33fbfd (patch) | |
tree | 82fde8252c3b0bd9927a7da6f81e241d07353984 /sysdeps/nptl | |
parent | 2e39f65b5ef11647beb4980c4244bac8af192c14 (diff) | |
download | glibc-9e92278ffad441daf588ff1ff5bd8094aa33fbfd.tar.gz glibc-9e92278ffad441daf588ff1ff5bd8094aa33fbfd.tar.xz glibc-9e92278ffad441daf588ff1ff5bd8094aa33fbfd.zip |
nptl: Remove clockwait_tid
It can be replaced with a __futex_abstimed_wait_cancelable64 call, with the advantage that there is no need to further clock adjustments to create a absolute timeout. It allows to remove the now ununsed futex_timed_wait_cancel64 internal function. Checked on x86_64-linux-gnu and i686-linux-gnu. Reviewed-by: Lukasz Majewski <lukma@denx.de>
Diffstat (limited to 'sysdeps/nptl')
-rw-r--r-- | sysdeps/nptl/futex-internal.h | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/sysdeps/nptl/futex-internal.h b/sysdeps/nptl/futex-internal.h index 96d1318091..d5f13d15fb 100644 --- a/sysdeps/nptl/futex-internal.h +++ b/sysdeps/nptl/futex-internal.h @@ -390,55 +390,6 @@ futex_unlock_pi (unsigned int *futex_word, int private) } } -static __always_inline int -futex_timed_wait_cancel64 (pid_t *tidp, pid_t tid, - const struct __timespec64 *timeout, int private) -{ - int err = INTERNAL_SYSCALL_CANCEL (futex_time64, tidp, - __lll_private_flag (FUTEX_WAIT, private), - tid, timeout); -#ifndef __ASSUME_TIME64_SYSCALLS - if (err == -ENOSYS) - { - if (in_time_t_range (timeout->tv_sec)) - { - struct timespec ts32 = valid_timespec64_to_timespec (*timeout); - - err = INTERNAL_SYSCALL_CANCEL (futex, tidp, - __lll_private_flag (FUTEX_WAIT, - private), - tid, &ts32); - } - else - err = -EOVERFLOW; - } -#endif - switch (err) - { - case 0: - case -EAGAIN: - case -EINTR: - case -ETIMEDOUT: - case -EDEADLK: - case -ENOSYS: - case -EOVERFLOW: /* Passed absolute timeout uses 64 bit time_t type, but - underlying kernel does not support 64 bit time_t futex - syscalls. */ - case -EPERM: /* The caller is not allowed to attach itself to the futex. - Used to check if PI futexes are supported by the - kernel. */ - return -err; - - case -EINVAL: /* Either due to wrong alignment or due to the timeout not - being normalized. Must have been caused by a glibc or - application bug. */ - case -EFAULT: /* Must have been caused by a glibc or application bug. */ - /* No other errors are documented at this time. */ - default: - futex_fatal_error (); - } -} - /* The futex_abstimed_wait_cancelable64 has been moved to a separate file to avoid problems with exhausting available registers on some architectures - e.g. on m68k architecture. */ |