This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH siddhesh/wait_bitset] Use FUTEX_WAIT_BITSET forpthread_cond_timedwait for non-x86: ppc, s390


On Fri, 02 Nov 2012 14:23:59 -0600, Jeff wrote:
> However, if it was in the INTERNAL_SYSCALL form I'd be a lot more 
> comfortable approving it since I don't know s390 assembly :-)
> However, it shouldn't be to terrible to have the INTERNAL_SYSCALL
> definition handy and verify your code is doing the same thing.
> 

I have verified that the result of using INTERNAL_SYSCALL is the same
as my assembly using the following (temporary) patch on top of my
changes.


Siddhesh


diff --git a/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h b/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h
index 0b7110f..b77026b 100644
--- a/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h
+++ b/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h
@@ -93,6 +93,7 @@
     __result;								      \
   })
 
+#if 0
 #define lll_futex_timed_wait_bitset(futexp, val, timespec, clockbit, private) \
   ({									      \
     register unsigned long int __r2 asm ("2") = (unsigned long int) (futexp); \
@@ -112,7 +113,21 @@
 		      : "cc", "memory" );				      \
     __result;								      \
   })
+#else
+#define lll_futex_timed_wait_bitset(futexp, val, timespec, clockbit, private) \
+  ({									      \
+    INTERNAL_SYSCALL_DECL (__err);					      \
+    long int __ret;							      \
+    int __op = FUTEX_WAIT_BITSET | clockbit;				      \
+									      \
+    __ret = INTERNAL_SYSCALL (futex, __err, 6, (futexp),		      \
+			      __lll_private_flag (__op, private),	      \
+			      (val), (timespec), NULL /* Unused.  */, 	      \
+			      FUTEX_BITSET_MATCH_ANY);			      \
+    __ret;								      \
+  })
 
+#endif
 
 #define lll_futex_wake(futex, nr, private) \
   ({									      \


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]