[PATCH] Fix pthread_cond_broadcast on s390/s390x

Jakub Jelinek jakub@redhat.com
Tue Jun 22 11:30:00 GMT 2004


Hi!

This pasto caused in the better case most of FUTEX_CMP_REQUEUE calls return
-EAGAIN, but if unlucky it might even succeed when it was supposed to fail.
Tested on both s390 and s390x.

2004-06-22  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
	Set __r7 to val, not mutex.

--- libc/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h.jj	2004-06-11 14:45:53.000000000 +0200
+++ libc/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h	2004-06-22 13:26:54.911154237 +0200
@@ -91,7 +91,7 @@
     register unsigned long int __r4 asm ("4") = (long int) (nr_wake);	      \
     register unsigned long int __r5 asm ("5") = (long int) (nr_move);	      \
     register unsigned long int __r6 asm ("6") = (unsigned long int) (mutex);  \
-    register unsigned long int __r7 asm ("7") = (int) (mutex);		      \
+    register unsigned long int __r7 asm ("7") = (int) (val);		      \
     register unsigned long __result asm ("2");				      \
 									      \
     __asm __volatile ("svc %b1"						      \

	Jakub



More information about the Libc-hacker mailing list