about summary refs log tree commit diff
path: root/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2007-08-03 15:50:30 +0000
committerUlrich Drepper <drepper@redhat.com>2007-08-03 15:50:30 +0000
commitce31a3b1c588f8b8a5c7702c6460d6bd4386bd95 (patch)
tree3b8f897b1e40b26d31f18e8095cfd9102612de71 /nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
parent96c502084aeb396c8794723b32bdcad58a634695 (diff)
downloadglibc-ce31a3b1c588f8b8a5c7702c6460d6bd4386bd95.tar.gz
glibc-ce31a3b1c588f8b8a5c7702c6460d6bd4386bd95.tar.xz
glibc-ce31a3b1c588f8b8a5c7702c6460d6bd4386bd95.zip
* intl/dcigettext.c (_nl_find_msg): Free encoding if __gconv_open
	failed.
	* intl/finddomain.c (_nl_find_domain): Free normalized_codeset
	on failure.

	* elf/dl-load.c (decompose_rpath): Free copy if result couldn't be
	allocated.

2007-08-03  Jakub Jelinek  <jakub@redhat.com>
Diffstat (limited to 'nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S')
-rw-r--r--nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S35
1 files changed, 20 insertions, 15 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S b/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
index e87326e9bd..b06fd960cf 100644
--- a/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
+++ b/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
@@ -17,18 +17,13 @@
    02111-1307 USA.  */
 
 #include <sysdep.h>
+#include <lowlevellock.h>
 #include <lowlevelrwlock.h>
 #include <pthread-errnos.h>
 #include <tcb-offsets.h>
 #include <kernel-features.h>
 #include "lowlevel-atomic.h"
 
-#define SYS_gettimeofday	__NR_gettimeofday
-#define SYS_futex		240
-#define FUTEX_WAIT		0
-#define FUTEX_WAKE		1
-#define FUTEX_PRIVATE_FLAG	128
-
 
 	.text
 
@@ -92,7 +87,7 @@ pthread_rwlock_timedrdlock:
 	/* Get current time.  */
 	mov	r15, r4
 	mov	#0, r5
-	mov	#SYS_gettimeofday, r3
+	mov	#__NR_gettimeofday, r3
 	trapa	#0x12
 	SYSCALL_INST_PAD
 
@@ -213,10 +208,12 @@ pthread_rwlock_timedrdlock:
 #if MUTEX != 0
 	add	#MUTEX, r5
 #endif
-	mov	r2, r4
+	mov	#PSHARED, r0
+	mov.b	@(r0,r8), r6
+	extu.b	r6, r6
 	mov.l	.Lwait2, r1
 	bsrf	r1
-	 nop
+	 mov	r2, r4
 .Lwait2b:
 	bra	2b
 	 nop
@@ -239,6 +236,9 @@ pthread_rwlock_timedrdlock:
 #if MUTEX != 0
 	add	#MUTEX, r4
 #endif
+	mov	#PSHARED, r0
+	mov.b	@(r0,r8), r5
+	extu.b	r5, r5
 	mov.l	.Lwake2, r1
 	bsrf	r1
 	 nop
@@ -267,6 +267,9 @@ pthread_rwlock_timedrdlock:
 #if MUTEX != 0
 	add	#MUTEX, r4
 #endif
+	mov	#PSHARED, r0
+	mov.b	@(r0,r8), r5
+	extu.b	r5, r5
 	mov.l	.Lwake3, r1
 	bsrf	r1
 	 nop
@@ -279,10 +282,12 @@ pthread_rwlock_timedrdlock:
 #if MUTEX != 0
 	add	#MUTEX, r5
 #endif
-	mov	r2, r4
+	mov	#PSHARED, r0
+	mov.b	@(r0,r8), r6
+	extu.b	r6, r6
 	mov.l	.Lwait3, r1
 	bsrf	r1
-	 nop
+	 mov	r2, r4
 .Lwait3b:
 	bra	13b
 	 nop
@@ -297,11 +302,11 @@ pthread_rwlock_timedrdlock:
 
 	.align	2
 .Lwait2:
-	.long	__lll_mutex_lock_wait-.Lwait2b
+	.long	__lll_lock_wait-.Lwait2b
 .Lwake2:
-	.long	__lll_mutex_unlock_wake-.Lwake2b
+	.long	__lll_unlock_wake-.Lwake2b
 .Lwait3:
-	.long	__lll_mutex_lock_wait-.Lwait3b
+	.long	__lll_lock_wait-.Lwait3b
 .Lwake3:
-	.long	__lll_mutex_unlock_wake-.Lwake3b
+	.long	__lll_unlock_wake-.Lwake3b
 	.size	pthread_rwlock_timedrdlock,.-pthread_rwlock_timedrdlock