diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2020-11-23 15:26:42 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2020-11-25 08:14:50 -0300 |
commit | 2e39f65b5ef11647beb4980c4244bac8af192c14 (patch) | |
tree | 2c01394ff73419ce9119e6aea0091cf2ac13fdd2 /sysdeps/nptl/futex-internal.h | |
parent | 7e9afa8a84a1f86937f2ae362288568c1e0133fb (diff) | |
download | glibc-2e39f65b5ef11647beb4980c4244bac8af192c14.tar glibc-2e39f65b5ef11647beb4980c4244bac8af192c14.tar.gz glibc-2e39f65b5ef11647beb4980c4244bac8af192c14.tar.bz2 glibc-2e39f65b5ef11647beb4980c4244bac8af192c14.zip |
nptl: Remove futex_wait_cancelable
It is used solely on __pthread_cond_wait_common and the call can be
replaced by a __futex_abstimed_wait_cancelable64 one.
Checked on x86_64-linux-gnu and i686-linux-gnu.
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Diffstat (limited to 'sysdeps/nptl/futex-internal.h')
-rw-r--r-- | sysdeps/nptl/futex-internal.h | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/sysdeps/nptl/futex-internal.h b/sysdeps/nptl/futex-internal.h index 21e3b74be6..96d1318091 100644 --- a/sysdeps/nptl/futex-internal.h +++ b/sysdeps/nptl/futex-internal.h @@ -177,35 +177,6 @@ futex_wait_simple (unsigned int *futex_word, unsigned int expected, ignore_value (futex_wait (futex_word, expected, private)); } - -/* Like futex_wait but is a POSIX cancellation point. */ -static __always_inline int -futex_wait_cancelable (unsigned int *futex_word, unsigned int expected, - int private) -{ - int oldtype; - oldtype = __pthread_enable_asynccancel (); - int err = lll_futex_timed_wait (futex_word, expected, NULL, private); - __pthread_disable_asynccancel (oldtype); - switch (err) - { - case 0: - case -EAGAIN: - case -EINTR: - return -err; - - case -ETIMEDOUT: /* Cannot have happened as we provided no timeout. */ - case -EFAULT: /* Must have been caused by a glibc or application bug. */ - 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 -ENOSYS: /* Must have been caused by a glibc bug. */ - /* No other errors are documented at this time. */ - default: - futex_fatal_error (); - } -} - /* Like futex_wait, but will eventually time out (i.e., stop being blocked) after the duration of time provided (i.e., RELTIME) has passed. The caller must provide a normalized RELTIME. RELTIME can also |