about summary refs log tree commit diff
path: root/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S
diff options
context:
space:
mode:
Diffstat (limited to 'nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S')
-rw-r--r--nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S24
1 files changed, 14 insertions, 10 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S b/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S
index df4df60d7f..1504c1aed1 100644
--- a/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S
+++ b/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S
@@ -17,15 +17,11 @@
    02111-1307 USA.  */
 
 #include <sysdep.h>
+#include <lowlevellock.h>
 #include <lowlevelrwlock.h>
 #include <kernel-features.h>
 #include "lowlevel-atomic.h"
 
-#define SYS_futex		240
-#define FUTEX_WAIT		0
-#define FUTEX_WAKE		1
-#define FUTEX_PRIVATE_FLAG	128
-
 
 	.text
 
@@ -138,10 +134,12 @@ __pthread_rwlock_unlock:
 #if MUTEX != 0
 	add	#MUTEX, r5
 #endif
-	mov	r2, r4
+	mov	#PSHARED, r0
+	mov.b	@(r0,r8), r6
+	extu.b	r6, r6
 	mov.l	.Lwait8, r1
 	bsrf	r1
-	 nop
+	 mov	r2, r4
 .Lwait8b:
 	bra	2b
 	 nop
@@ -150,6 +148,9 @@ __pthread_rwlock_unlock:
 #if MUTEX != 0
 	add	#MUTEX, r4
 #endif
+	mov	#PSHARED, r0
+	mov.b	@(r0,r8), r5
+	extu.b	r5, r5
 	mov.l	.Lwake8, r1
 	bsrf	r1
 	 nop
@@ -164,6 +165,9 @@ __pthread_rwlock_unlock:
 #if MUTEX != 0
 	add	#MUTEX, r4
 #endif
+	mov	#PSHARED, r0
+	mov.b	@(r0,r8), r5
+	extu.b	r5, r5
 	mov.l	.Lwake9, r1
 	bsrf	r1
 	 nop
@@ -179,11 +183,11 @@ __pthread_rwlock_unlock:
 #endif
 	.align	2
 .Lwait8:	
-	.long	__lll_mutex_lock_wait-.Lwait8b
+	.long	__lll_lock_wait-.Lwait8b
 .Lwake8:
-	.long	__lll_mutex_unlock_wake-.Lwake8b
+	.long	__lll_unlock_wake-.Lwake8b
 .Lwake9:
-	.long	__lll_mutex_unlock_wake-.Lwake9b
+	.long	__lll_unlock_wake-.Lwake9b
 	.size	__pthread_rwlock_unlock,.-__pthread_rwlock_unlock
 
 	.globl	pthread_rwlock_unlock