about summary refs log tree commit diff
path: root/nptl
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-05-30 03:20:29 +0000
committerUlrich Drepper <drepper@redhat.com>2003-05-30 03:20:29 +0000
commit284bdc42e866adf2d5eafd83ab471735350e2356 (patch)
tree89b662e24a1eb5983d6275c76828813ab40e830d /nptl
parente7c5ac68ed5516057945fab1ff360ebcb832b224 (diff)
downloadglibc-284bdc42e866adf2d5eafd83ab471735350e2356.tar.gz
glibc-284bdc42e866adf2d5eafd83ab471735350e2356.tar.xz
glibc-284bdc42e866adf2d5eafd83ab471735350e2356.zip
Update.
2003-05-30  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/powerpc/powerpc32/elf/start.S: Make code compilable with
	SHARED.
Diffstat (limited to 'nptl')
-rw-r--r--nptl/ChangeLog11
-rw-r--r--nptl/sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h1
-rw-r--r--nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h25
3 files changed, 36 insertions, 1 deletions
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index 1515637e65..0d0573cc0f 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -3,6 +3,17 @@
 	* sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
 	Find break parameter in correct asm argument.
 
+2003-05-27  Jakub Jelinek  <jakub@redhat.com>
+
+	* sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
+	Remove out4.
+	(lll_futex_requeue): Fix __o3 constraint, return negative errno if
+	error occured.
+	* sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
+	Add __mutex.
+	* sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
+	lll_futex_requeue, lll_mutex_unlock_force): Define.
+
 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
 
 	* sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
diff --git a/nptl/sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h b/nptl/sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
index 3ebaeb9391..855af4dcbd 100644
--- a/nptl/sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
+++ b/nptl/sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
@@ -92,6 +92,7 @@ typedef union
     unsigned long long int __total_seq;
     unsigned long long int __wakeup_seq;
     unsigned long long int __woken_seq;
+    void *__mutex;
   } __data;
   char __size[__SIZEOF_PTHREAD_COND_T];
   long long int __align;
diff --git a/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h b/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h
index 0846503e2f..62a06b5c5e 100644
--- a/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h
+++ b/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h
@@ -27,6 +27,7 @@
 #define SYS_futex		238
 #define FUTEX_WAIT		0
 #define FUTEX_WAKE		1
+#define FUTEX_REQUEUE		3
 
 /* Initializer for compatibility lock.	*/
 #define LLL_MUTEX_LOCK_INITIALIZER (0)
@@ -80,6 +81,24 @@
   })
 
 
+#define lll_futex_requeue(futex, nr_wake, nr_move, mutex) \
+  ({									      \
+     register unsigned long int __r2 asm ("2") = (unsigned long int) (futex); \
+     register unsigned long int __r3 asm ("3") = FUTEX_REQUEUE;		      \
+     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 __result asm ("2");				      \
+									      \
+    __asm __volatile ("svc %b1"						      \
+		      : "=d" (__result)					      \
+		      : "i" (SYS_futex), "0" (__r2), "d" (__r3),	      \
+			"d" (__r4), "d" (__r5), "d" (__r6)		      \
+		      : "cc", "memory" );				      \
+    __result;								      \
+  })
+
+
 #define lll_compare_and_swap(futex, oldval, newval, operation) \
   do {									      \
     __typeof (futex) __futex = (futex);					      \
@@ -157,7 +176,11 @@ __lll_mutex_unlock (int *futex)
   if (oldval > 1)
     lll_futex_wake (futex, 1);
 }
-#define lll_mutex_unlock(futex) __lll_mutex_unlock(&(futex))
+#define lll_mutex_unlock(futex) \
+  __lll_mutex_unlock(&(futex))
+
+#define lll_mutex_unlock_force(futex) \
+  lll_futex_wake (&(futex), 1)
 
 #define lll_mutex_islocked(futex) \
   (futex != 0)