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