|
|
147e83 |
Upstream x86_64 uses the generic lll_futex_timed_wait_bitset, but for
|
|
|
147e83 |
rhel-7 we have not yet backported the larger generic futex cleanups.
|
|
|
147e83 |
To keep x86_64 using the tested code paths we add a generic
|
|
|
147e83 |
lll_futex_timed_wait_bitset. We do not do the same for i686, where we
|
|
|
147e83 |
let the code use the lll_futex_timed_wait fallback. For i686 it would
|
|
|
147e83 |
be harder to add lll_futex_timed_wait_bitset because it requires more
|
|
|
147e83 |
complex 6-argument syscall handling backports, so we do not do that.
|
|
|
147e83 |
|
|
|
147e83 |
Not needed upstream.
|
|
|
147e83 |
|
|
|
147e83 |
Index: glibc-2.17-c758a686/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
|
|
|
147e83 |
===================================================================
|
|
|
147e83 |
--- glibc-2.17-c758a686.orig/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
|
|
|
147e83 |
+++ glibc-2.17-c758a686/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
|
|
|
147e83 |
@@ -223,6 +223,20 @@ LLL_STUB_UNWIND_INFO_END
|
|
|
147e83 |
__status; \
|
|
|
147e83 |
})
|
|
|
147e83 |
|
|
|
147e83 |
+#define lll_futex_timed_wait_bitset(futexp, val, timespec, clockbit, private) \
|
|
|
147e83 |
+ ({ \
|
|
|
147e83 |
+ INTERNAL_SYSCALL_DECL (__err); \
|
|
|
147e83 |
+ long int __ret; \
|
|
|
147e83 |
+ int __op = FUTEX_WAIT_BITSET | clockbit; \
|
|
|
147e83 |
+ \
|
|
|
147e83 |
+ __ret = INTERNAL_SYSCALL (futex, __err, 6, (futexp), \
|
|
|
147e83 |
+ __lll_private_flag (__op, private), \
|
|
|
147e83 |
+ (val), (timespec), NULL /* Unused. */, \
|
|
|
147e83 |
+ FUTEX_BITSET_MATCH_ANY); \
|
|
|
147e83 |
+ (__glibc_unlikely (INTERNAL_SYSCALL_ERROR_P (__ret, __err)) \
|
|
|
147e83 |
+ ? -INTERNAL_SYSCALL_ERRNO (__ret, __err) : 0); \
|
|
|
147e83 |
+ })
|
|
|
147e83 |
+
|
|
|
147e83 |
|
|
|
147e83 |
#define lll_futex_wake(futex, nr, private) \
|
|
|
147e83 |
({ \
|