diff options
Diffstat (limited to 'sysdeps/nptl')
-rw-r--r-- | sysdeps/nptl/lowlevellock-futex.h | 7 | ||||
-rw-r--r-- | sysdeps/nptl/lowlevellock.h | 26 |
2 files changed, 7 insertions, 26 deletions
diff --git a/sysdeps/nptl/lowlevellock-futex.h b/sysdeps/nptl/lowlevellock-futex.h index 50ceba71ff..bb8effe288 100644 --- a/sysdeps/nptl/lowlevellock-futex.h +++ b/sysdeps/nptl/lowlevellock-futex.h @@ -82,5 +82,12 @@ val, private) \ -ENOSYS +/* Like lll_futex_wait, but acting as a cancellable entrypoint. */ +#define lll_futex_wait_cancel(futexp, val, private) \ + -ENOSYS + +/* Like lll_futex_timed_wait, but acting as a cancellable entrypoint. */ +#define lll_futex_timed_wait_cancel(futexp, val, timeout, private) \ + -ENOSYS #endif /* lowlevellock-futex.h */ diff --git a/sysdeps/nptl/lowlevellock.h b/sysdeps/nptl/lowlevellock.h index 36bbc472e7..6f017afdd5 100644 --- a/sysdeps/nptl/lowlevellock.h +++ b/sysdeps/nptl/lowlevellock.h @@ -175,30 +175,4 @@ extern int __lll_timedlock_wait (int *futex, const struct timespec *, #define LLL_LOCK_INITIALIZER (0) #define LLL_LOCK_INITIALIZER_LOCKED (1) -extern int __lll_timedwait_tid (int *, const struct timespec *) - attribute_hidden; - -/* The kernel notifies a process which uses CLONE_CHILD_CLEARTID via futex - wake-up when the clone terminates. The memory location contains the - thread ID while the clone is running and is reset to zero by the kernel - afterwards. The kernel up to version 3.16.3 does not use the private futex - operations for futex wake-up when the clone terminates. - If ABSTIME is not NULL, is used a timeout for futex call. If the timeout - occurs then return ETIMEOUT, if ABSTIME is invalid, return EINVAL. - The futex operation are issues with cancellable versions. */ -#define lll_wait_tid(tid, abstime) \ - ({ \ - int __res = 0; \ - __typeof (tid) __tid; \ - if (abstime != NULL) \ - __res = __lll_timedwait_tid (&(tid), (abstime)); \ - else \ - /* We need acquire MO here so that we synchronize with the \ - kernel's store to 0 when the clone terminates. (see above) */ \ - while ((__tid = atomic_load_acquire (&(tid))) != 0) \ - lll_futex_wait_cancel (&(tid), __tid, LLL_SHARED); \ - __res; \ - }) - - #endif /* lowlevellock.h */ |