about summary refs log tree commit diff
path: root/nptl/sysdeps/unix/sysv/linux/x86_64
diff options
context:
space:
mode:
Diffstat (limited to 'nptl/sysdeps/unix/sysv/linux/x86_64')
-rw-r--r--nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h5
-rw-r--r--nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S6
-rw-r--r--nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S6
-rw-r--r--nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S10
-rw-r--r--nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S10
5 files changed, 19 insertions, 18 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h b/nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
index 7c12db6fc6..b2919ab4c6 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
@@ -112,9 +112,10 @@ typedef union
     unsigned int __writer_wakeup;
     unsigned int __nr_readers_queued;
     unsigned int __nr_writers_queued;
-    pthread_t __writer;
-    unsigned long int __pad1;
+    int __writer;
+    int __pad1;
     unsigned long int __pad2;
+    unsigned long int __pad3;
     /* FLAGS must stay at this position in the structure to maintain
        binary compatibility.  */
     unsigned int __flags;
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S
index 0b0ccf7027..0fd093e7dd 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S
@@ -52,8 +52,8 @@ __pthread_rwlock_rdlock:
 	testl	%esi, %esi
 	jne	1f
 
-2:	movq	WRITER(%rdi), %rax
-	testq	%rax, %rax
+2:	movl	WRITER(%rdi), %eax
+	testl	%eax, %eax
 	jne	14f
 	cmpl	$0, WRITERS_QUEUED(%rdi)
 	je	5f
@@ -119,7 +119,7 @@ __pthread_rwlock_rdlock:
 #endif
 	jmp	2b
 
-14:	cmpq	%fs:SELF, %rax
+14:	cmpl	%fs:TID, %eax
 	jne	3b
 	/* Deadlock detected.  */
 	movq	$EDEADLK, %rdx
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
index b522f3c07e..582e030abc 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
@@ -62,8 +62,8 @@ pthread_rwlock_timedrdlock:
 	testl	%esi, %esi
 	jne	1f
 
-2:	movq	WRITER(%r12), %rax
-	testq	%rax, %rax
+2:	movl	WRITER(%r12), %eax
+	testl	%eax, %eax
 	jne	14f
 	cmpl	$0, WRITERS_QUEUED(%r12)
 	je	5f
@@ -166,7 +166,7 @@ pthread_rwlock_timedrdlock:
 	callq	__lll_mutex_lock_wait
 	jmp	2b
 
-14:	cmpq	%fs:SELF, %rax
+14:	cmpl	%fs:TID, %eax
 	jne	3b
 	movq	$EDEADLK, %rdx
 	jmp	9b
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
index 6cbadabb07..e7acab538a 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
@@ -61,8 +61,8 @@ pthread_rwlock_timedwrlock:
 	testl	%esi, %esi
 	jne	1f
 
-2:	movq	WRITER(%r12), %rax
-	testq	%rax, %rax
+2:	movl	WRITER(%r12), %eax
+	testl	%eax, %eax
 	jne	14f
 	cmpl	$0, NR_READERS(%r12)
 	je	5f
@@ -137,8 +137,8 @@ pthread_rwlock_timedwrlock:
 
 
 5:	xorq	%rdx, %rdx
-	movq	%fs:SELF, %rax
-	movq	%rax, WRITER(%r12)
+	movl	%fs:TID, %eax
+	movl	%eax, WRITER(%r12)
 9:	LOCK
 #if MUTEX == 0
 	decl	(%r12)
@@ -162,7 +162,7 @@ pthread_rwlock_timedwrlock:
 	callq	__lll_mutex_lock_wait
 	jmp	2b
 
-14:	cmpq	%fs:SELF, %rax
+14:	cmpl	%fs:TID, %eax
 	jne	3b
 20:	movq	$EDEADLK, %rdx
 	jmp	9b
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S
index 9e7336b20e..f866d2e271 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S
@@ -52,8 +52,8 @@ __pthread_rwlock_wrlock:
 	testl	%esi, %esi
 	jne	1f
 
-2:	movq	WRITER(%rdi), %rax
-	testq	%rax, %rax
+2:	movl	WRITER(%rdi), %eax
+	testl	%eax, %eax
 	jne	14f
 	cmpl	$0, NR_READERS(%rdi)
 	je	5f
@@ -93,8 +93,8 @@ __pthread_rwlock_wrlock:
 	jmp	2b
 
 5:	xorq	%rdx, %rdx
-	movq	%fs:SELF, %rax
-	movq	%rax, WRITER(%rdi)
+	movl	%fs:TID, %eax
+	movl	%eax, WRITER(%rdi)
 9:	LOCK
 #if MUTEX == 0
 	decl	(%rdi)
@@ -117,7 +117,7 @@ __pthread_rwlock_wrlock:
 #endif
 	jmp	2b
 
-14:	cmpq	%fs:SELF, %rax
+14:	cmpl	%fs:TID, %eax
 	jne	3b
 	movq	$EDEADLK, %rdx
 	jmp	9b