|
|
b37e2e8 |
diff -Nrup a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
|
|
|
b37e2e8 |
--- a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S 2012-01-01 20:52:51.546347249 -0700
|
|
|
b37e2e8 |
+++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S 2012-01-01 20:57:21.880320786 -0700
|
|
|
b37e2e8 |
@@ -137,7 +137,6 @@ __pthread_cond_wait:
|
|
|
25912ea |
cmpl $PI_BIT, %eax
|
|
|
25912ea |
jne 18f
|
|
|
25912ea |
|
|
|
25912ea |
-90:
|
|
|
25912ea |
movl $(FUTEX_WAIT_REQUEUE_PI|FUTEX_PRIVATE_FLAG), %ecx
|
|
|
25912ea |
movl %ebp, %edx
|
|
|
25912ea |
xorl %esi, %esi
|
|
|
b37e2e8 |
@@ -151,9 +150,6 @@ __pthread_cond_wait:
|
|
|
25912ea |
sete 16(%esp)
|
|
|
25912ea |
je 19f
|
|
|
25912ea |
|
|
|
25912ea |
- cmpl $-EAGAIN, %eax
|
|
|
25912ea |
- je 91f
|
|
|
25912ea |
-
|
|
|
25912ea |
/* Normal and PI futexes dont mix. Use normal futex functions only
|
|
|
25912ea |
if the kernel does not support the PI futex functions. */
|
|
|
25912ea |
cmpl $-ENOSYS, %eax
|
|
|
b37e2e8 |
@@ -398,78 +394,6 @@ __pthread_cond_wait:
|
|
|
25912ea |
#endif
|
|
|
25912ea |
call __lll_unlock_wake
|
|
|
25912ea |
jmp 11b
|
|
|
25912ea |
-
|
|
|
25912ea |
-91:
|
|
|
25912ea |
-.LcleanupSTART2:
|
|
|
25912ea |
- /* FUTEX_WAIT_REQUEUE_PI returned EAGAIN. We need to
|
|
|
25912ea |
- call it again. */
|
|
|
25912ea |
-
|
|
|
25912ea |
- /* Get internal lock. */
|
|
|
25912ea |
- movl $1, %edx
|
|
|
25912ea |
- xorl %eax, %eax
|
|
|
25912ea |
- LOCK
|
|
|
25912ea |
-#if cond_lock == 0
|
|
|
25912ea |
- cmpxchgl %edx, (%ebx)
|
|
|
25912ea |
-#else
|
|
|
25912ea |
- cmpxchgl %edx, cond_lock(%ebx)
|
|
|
25912ea |
-#endif
|
|
|
25912ea |
- jz 92f
|
|
|
25912ea |
-
|
|
|
25912ea |
-#if cond_lock == 0
|
|
|
25912ea |
- movl %ebx, %edx
|
|
|
25912ea |
-#else
|
|
|
25912ea |
- leal cond_lock(%ebx), %edx
|
|
|
25912ea |
-#endif
|
|
|
25912ea |
-#if (LLL_SHARED-LLL_PRIVATE) > 255
|
|
|
25912ea |
- xorl %ecx, %ecx
|
|
|
25912ea |
-#endif
|
|
|
25912ea |
- cmpl $-1, dep_mutex(%ebx)
|
|
|
25912ea |
- setne %cl
|
|
|
25912ea |
- subl $1, %ecx
|
|
|
25912ea |
- andl $(LLL_SHARED-LLL_PRIVATE), %ecx
|
|
|
25912ea |
-#if LLL_PRIVATE != 0
|
|
|
25912ea |
- addl $LLL_PRIVATE, %ecx
|
|
|
25912ea |
-#endif
|
|
|
25912ea |
- call __lll_lock_wait
|
|
|
25912ea |
-
|
|
|
25912ea |
-92:
|
|
|
25912ea |
- /* Increment the cond_futex value again, so it can be used as a new
|
|
|
25912ea |
- expected value. */
|
|
|
25912ea |
- addl $1, cond_futex(%ebx)
|
|
|
25912ea |
- movl cond_futex(%ebx), %ebp
|
|
|
25912ea |
-
|
|
|
25912ea |
- /* Unlock. */
|
|
|
25912ea |
- LOCK
|
|
|
25912ea |
-#if cond_lock == 0
|
|
|
25912ea |
- subl $1, (%ebx)
|
|
|
25912ea |
-#else
|
|
|
25912ea |
- subl $1, cond_lock(%ebx)
|
|
|
25912ea |
-#endif
|
|
|
25912ea |
- je 93f
|
|
|
25912ea |
-#if cond_lock == 0
|
|
|
25912ea |
- movl %ebx, %eax
|
|
|
25912ea |
-#else
|
|
|
25912ea |
- leal cond_lock(%ebx), %eax
|
|
|
25912ea |
-#endif
|
|
|
25912ea |
-#if (LLL_SHARED-LLL_PRIVATE) > 255
|
|
|
25912ea |
- xorl %ecx, %ecx
|
|
|
25912ea |
-#endif
|
|
|
25912ea |
- cmpl $-1, dep_mutex(%ebx)
|
|
|
25912ea |
- setne %cl
|
|
|
25912ea |
- subl $1, %ecx
|
|
|
25912ea |
- andl $(LLL_SHARED-LLL_PRIVATE), %ecx
|
|
|
25912ea |
-#if LLL_PRIVATE != 0
|
|
|
25912ea |
- addl $LLL_PRIVATE, %ecx
|
|
|
25912ea |
-#endif
|
|
|
25912ea |
- call __lll_unlock_wake
|
|
|
25912ea |
-
|
|
|
25912ea |
-93:
|
|
|
25912ea |
- /* Set the rest of SYS_futex args for FUTEX_WAIT_REQUEUE_PI. */
|
|
|
25912ea |
- xorl %ecx, %ecx
|
|
|
25912ea |
- movl dep_mutex(%ebx), %edi
|
|
|
25912ea |
- jmp 90b
|
|
|
25912ea |
-.LcleanupEND2:
|
|
|
25912ea |
-
|
|
|
25912ea |
.size __pthread_cond_wait, .-__pthread_cond_wait
|
|
|
25912ea |
versioned_symbol (libpthread, __pthread_cond_wait, pthread_cond_wait,
|
|
|
25912ea |
GLIBC_2_3_2)
|
|
|
b37e2e8 |
@@ -642,10 +566,6 @@ __condvar_w_cleanup:
|
|
|
25912ea |
.long .LcleanupEND-.Lsub_cond_futex
|
|
|
25912ea |
.long __condvar_w_cleanup-.LSTARTCODE
|
|
|
25912ea |
.uleb128 0
|
|
|
25912ea |
- .long .LcleanupSTART2-.LSTARTCODE
|
|
|
25912ea |
- .long .LcleanupEND2-.LcleanupSTART2
|
|
|
25912ea |
- .long __condvar_w_cleanup-.LSTARTCODE
|
|
|
25912ea |
- .uleb128 0
|
|
|
25912ea |
.long .LcallUR-.LSTARTCODE
|
|
|
25912ea |
.long .LENDCODE-.LcallUR
|
|
|
25912ea |
.long 0
|
|
|
b37e2e8 |
diff -Nrup a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
|
|
|
b37e2e8 |
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S 2012-01-01 20:52:51.550347247 -0700
|
|
|
b37e2e8 |
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S 2012-01-01 20:57:21.883320786 -0700
|
|
|
b37e2e8 |
@@ -137,14 +137,11 @@ __pthread_cond_wait:
|
|
|
25912ea |
cmpl $PI_BIT, %eax
|
|
|
25912ea |
jne 61f
|
|
|
25912ea |
|
|
|
25912ea |
-90:
|
|
|
25912ea |
movl $(FUTEX_WAIT_REQUEUE_PI|FUTEX_PRIVATE_FLAG), %esi
|
|
|
25912ea |
movl $SYS_futex, %eax
|
|
|
25912ea |
syscall
|
|
|
25912ea |
|
|
|
25912ea |
movl $1, %r8d
|
|
|
25912ea |
- cmpq $-EAGAIN, %rax
|
|
|
25912ea |
- je 91f
|
|
|
25912ea |
#ifdef __ASSUME_REQUEUE_PI
|
|
|
25912ea |
jmp 62f
|
|
|
25912ea |
#else
|
|
|
b37e2e8 |
@@ -331,70 +328,6 @@ __pthread_cond_wait:
|
|
|
25912ea |
|
|
|
25912ea |
13: movq %r10, %rax
|
|
|
25912ea |
jmp 14b
|
|
|
25912ea |
-
|
|
|
25912ea |
-91:
|
|
|
25912ea |
-.LcleanupSTART2:
|
|
|
25912ea |
- /* FUTEX_WAIT_REQUEUE_PI returned EAGAIN. We need to
|
|
|
25912ea |
- call it again. */
|
|
|
25912ea |
- movq 8(%rsp), %rdi
|
|
|
25912ea |
-
|
|
|
25912ea |
- /* Get internal lock. */
|
|
|
25912ea |
- movl $1, %esi
|
|
|
25912ea |
- xorl %eax, %eax
|
|
|
25912ea |
- LOCK
|
|
|
25912ea |
-#if cond_lock == 0
|
|
|
25912ea |
- cmpxchgl %esi, (%rdi)
|
|
|
25912ea |
-#else
|
|
|
25912ea |
- cmpxchgl %esi, cond_lock(%rdi)
|
|
|
25912ea |
-#endif
|
|
|
25912ea |
- jz 92f
|
|
|
25912ea |
-
|
|
|
25912ea |
-#if cond_lock != 0
|
|
|
25912ea |
- addq $cond_lock, %rdi
|
|
|
25912ea |
-#endif
|
|
|
25912ea |
- cmpq $-1, dep_mutex-cond_lock(%rdi)
|
|
|
25912ea |
- movl $LLL_PRIVATE, %eax
|
|
|
25912ea |
- movl $LLL_SHARED, %esi
|
|
|
25912ea |
- cmovne %eax, %esi
|
|
|
25912ea |
- callq __lll_lock_wait
|
|
|
25912ea |
-#if cond_lock != 0
|
|
|
25912ea |
- subq $cond_lock, %rdi
|
|
|
25912ea |
-#endif
|
|
|
25912ea |
-92:
|
|
|
25912ea |
- /* Increment the cond_futex value again, so it can be used as a new
|
|
|
25912ea |
- expected value. */
|
|
|
25912ea |
- incl cond_futex(%rdi)
|
|
|
25912ea |
- movl cond_futex(%rdi), %edx
|
|
|
25912ea |
-
|
|
|
25912ea |
- /* Release internal lock. */
|
|
|
25912ea |
- LOCK
|
|
|
25912ea |
-#if cond_lock == 0
|
|
|
25912ea |
- decl (%rdi)
|
|
|
25912ea |
-#else
|
|
|
25912ea |
- decl cond_lock(%rdi)
|
|
|
25912ea |
-#endif
|
|
|
25912ea |
- jz 93f
|
|
|
25912ea |
-
|
|
|
25912ea |
-#if cond_lock != 0
|
|
|
25912ea |
- addq $cond_lock, %rdi
|
|
|
25912ea |
-#endif
|
|
|
25912ea |
- cmpq $-1, dep_mutex-cond_lock(%rdi)
|
|
|
25912ea |
- movl $LLL_PRIVATE, %eax
|
|
|
25912ea |
- movl $LLL_SHARED, %esi
|
|
|
25912ea |
- cmovne %eax, %esi
|
|
|
25912ea |
- /* The call preserves %rdx. */
|
|
|
25912ea |
- callq __lll_unlock_wake
|
|
|
25912ea |
-#if cond_lock != 0
|
|
|
25912ea |
- subq $cond_lock, %rdi
|
|
|
25912ea |
-#endif
|
|
|
25912ea |
-93:
|
|
|
25912ea |
- /* Set the rest of SYS_futex args for FUTEX_WAIT_REQUEUE_PI. */
|
|
|
25912ea |
- xorq %r10, %r10
|
|
|
25912ea |
- movq dep_mutex(%rdi), %r8
|
|
|
25912ea |
- leaq cond_futex(%rdi), %rdi
|
|
|
25912ea |
- jmp 90b
|
|
|
25912ea |
-.LcleanupEND2:
|
|
|
25912ea |
-
|
|
|
25912ea |
.size __pthread_cond_wait, .-__pthread_cond_wait
|
|
|
25912ea |
versioned_symbol (libpthread, __pthread_cond_wait, pthread_cond_wait,
|
|
|
25912ea |
GLIBC_2_3_2)
|
|
|
b37e2e8 |
@@ -547,15 +480,11 @@ __condvar_cleanup1:
|
|
|
25912ea |
.uleb128 .LcleanupSTART-.LSTARTCODE
|
|
|
25912ea |
.uleb128 .LcleanupEND-.LcleanupSTART
|
|
|
25912ea |
.uleb128 __condvar_cleanup1-.LSTARTCODE
|
|
|
25912ea |
- .uleb128 0
|
|
|
25912ea |
- .uleb128 .LcleanupSTART2-.LSTARTCODE
|
|
|
25912ea |
- .uleb128 .LcleanupEND2-.LcleanupSTART2
|
|
|
25912ea |
- .uleb128 __condvar_cleanup1-.LSTARTCODE
|
|
|
25912ea |
- .uleb128 0
|
|
|
25912ea |
+ .uleb128 0
|
|
|
25912ea |
.uleb128 .LcallUR-.LSTARTCODE
|
|
|
25912ea |
.uleb128 .LENDCODE-.LcallUR
|
|
|
25912ea |
.uleb128 0
|
|
|
25912ea |
- .uleb128 0
|
|
|
25912ea |
+ .uleb128 0
|
|
|
25912ea |
.Lcstend:
|
|
|
25912ea |
|
|
|
25912ea |
|