diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2020-11-20 10:58:51 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2020-11-25 10:43:17 -0300 |
commit | e77221a523bc07abb4a0141543f6d52e705bd831 (patch) | |
tree | 1ad0ad7316985b2d36e931c724df2ad61c8cf8d3 /sysdeps/nptl/futex-internal.h | |
parent | 9e92278ffad441daf588ff1ff5bd8094aa33fbfd (diff) | |
download | glibc-e77221a523bc07abb4a0141543f6d52e705bd831.tar glibc-e77221a523bc07abb4a0141543f6d52e705bd831.tar.gz glibc-e77221a523bc07abb4a0141543f6d52e705bd831.tar.bz2 glibc-e77221a523bc07abb4a0141543f6d52e705bd831.zip |
nptl: Extend __futex_abstimed_wait_cancelable64 comment
And add a small optimization to avoid setting the operation for the
32-bit time fallback operation.
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 | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/sysdeps/nptl/futex-internal.h b/sysdeps/nptl/futex-internal.h index d5f13d15fb..8c1d592308 100644 --- a/sysdeps/nptl/futex-internal.h +++ b/sysdeps/nptl/futex-internal.h @@ -390,9 +390,17 @@ futex_unlock_pi (unsigned int *futex_word, int private) } } -/* 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. */ +/* Like futex_wait, but will eventually time out (i.e., stop being blocked) + after the duration of time provided (i.e., ABSTIME) has passed using the + clock specified by CLOCKID (currently only CLOCK_REALTIME and + CLOCK_MONOTONIC, the ones support by lll_futex_supported_clockid). ABSTIME + can also equal NULL, in which case this function behaves equivalent to + futex_wait. + + Returns the same values as futex_wait under those same conditions; + additionally, returns ETIMEDOUT if the timeout expired. + + The call acts as a cancellation entrypoint. */ int __futex_abstimed_wait_cancelable64 (unsigned int* futex_word, unsigned int expected, clockid_t clockid, |