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