about summary refs log tree commit diff
path: root/nptl/sysdeps/unix/sysv
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2006-01-20 16:49:36 +0000
committerUlrich Drepper <drepper@redhat.com>2006-01-20 16:49:36 +0000
commita6df738797825b5d19448903b9b7c35b091e13c2 (patch)
tree84bcbef708f799bdfda21dd76bbba26a53ae2e7d /nptl/sysdeps/unix/sysv
parent7c65e9001b93d5d20046bc4d50fd10fff5f4adc2 (diff)
downloadglibc-a6df738797825b5d19448903b9b7c35b091e13c2.tar.gz
glibc-a6df738797825b5d19448903b9b7c35b091e13c2.tar.xz
glibc-a6df738797825b5d19448903b9b7c35b091e13c2.zip
* sysdeps/sh/sh4/__longjmp.S: Demangle also r14 and r15.
	* sysdeps/sh/sh3/__longjmp.S: Likewise.
	* sysdeps/sh/sh4/setjmp.S: Mangle also r14 and r15.
	* sysdeps/sh/sh3/setjmp.S: Likewise.
	* sysdeps/unix/sysv/linux/sh/sysdep.h [__ASSEMBLER__]
	(PTR_MANGLE): Add temporary register as the second parameter.
	(PTR_DEMANGLE): Likewize.
	(PTR_MANGLE2, PTR_DEMANGLE2): Define.
Diffstat (limited to 'nptl/sysdeps/unix/sysv')
-rw-r--r--nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h28
1 files changed, 23 insertions, 5 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h b/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h
index d9376d45a0..e3e3777f44 100644
--- a/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h
+++ b/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -181,19 +181,37 @@ typedef int lll_lock_t;
 # endif
 
 #define lll_futex_wait(futex, val) \
-  do {									      \
-    int __ignore;							      \
+  ({									      \
+    int __status;							      \
     register unsigned long __r3 asm ("r3") = SYS_futex;			      \
     register unsigned long __r4 asm ("r4") = (unsigned long) (futex);	      \
     register unsigned long __r5 asm ("r5") = FUTEX_WAIT;		      \
     register unsigned long __r6 asm ("r6") = (unsigned long) (val);	      \
     register unsigned long __r7 asm ("r7") = 0;				      \
     __asm __volatile (SYSCALL_WITH_INST_PAD				      \
-		      : "=z" (__ignore)					      \
+		      : "=z" (__status)					      \
 		      : "r" (__r3), "r" (__r4), "r" (__r5),		      \
 			"r" (__r6), "r" (__r7)				      \
 		      : "memory", "t");					      \
-  } while (0)
+    __status;								      \
+  })
+
+
+#define lll_futex_timed_wait(futex, val, timeout) \
+  ({									      \
+    int __status;							      \
+    register unsigned long __r3 asm ("r3") = SYS_futex;			      \
+    register unsigned long __r4 asm ("r4") = (unsigned long) (futex);	      \
+    register unsigned long __r5 asm ("r5") = FUTEX_WAIT;		      \
+    register unsigned long __r6 asm ("r6") = (unsigned long) (val);	      \
+    register unsigned long __r7 asm ("r7") = (timeout);			      \
+    __asm __volatile (SYSCALL_WITH_INST_PAD				      \
+		      : "=z" (__status)					      \
+		      : "r" (__r3), "r" (__r4), "r" (__r5),		      \
+			"r" (__r6), "r" (__r7)				      \
+		      : "memory", "t");					      \
+    __status;								      \
+  })
 
 
 #define lll_futex_wake(futex, nr) \