about summary refs log tree commit diff
path: root/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
diff options
context:
space:
mode:
Diffstat (limited to 'nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S')
-rw-r--r--nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S8
1 files changed, 4 insertions, 4 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S b/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
index 3aba58de14..5bcaec09c0 100644
--- a/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
+++ b/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
@@ -42,13 +42,13 @@ __pthread_cond_broadcast:
 	mov	r4, r8
 
 	/* Get internal lock.  */
-	mov	#1, r3
+	mov	#0, r3
+	mov	#1, r4
 #if cond_lock != 0
-	XADD (r3, @(cond_lock,r8), r2)
+	CMPXCHG (r3, @(cond_lock,r8), r4, r2)
 #else
-	XADD (r3, @r8, r2)
+	CMPXCHG (r3, @r8, r4, r2)
 #endif
-	tst	r2, r2
 	bf	1f
 2:
 	mov.l	@(total_seq+4,r8),r0