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