summaryrefslogtreecommitdiff
path: root/nptl/sysdeps/unix/sysv/linux/i386/i486
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-05-18 20:18:14 +0000
committerUlrich Drepper <drepper@redhat.com>2004-05-18 20:18:14 +0000
commit893a351195a2997133892ffac80573a9984ba4cf (patch)
treead1b9f1a9e7d55b25353c57f9fbd5f76c4804054 /nptl/sysdeps/unix/sysv/linux/i386/i486
parentd40eb37aad4145ae4d047b6d7f633f740bf3a610 (diff)
[BZ #163]
Update. 2004-05-18 Petter Reinholdtsen <pere@hungry.com> * locales/sl_SI [LC_TIME]: Correct d_fmt date format from '22.06.2003' to '22. 06. 2003'. Change requested from Aleks Reinhardt, and approved by the locale author Borka Jerman-Blazic. [BZ #163]
Diffstat (limited to 'nptl/sysdeps/unix/sysv/linux/i386/i486')
-rw-r--r--nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S5
-rw-r--r--nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S31
-rw-r--r--nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S21
3 files changed, 43 insertions, 14 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
index 8d09e22afd..456f3dbfb1 100644
--- a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
+++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
@@ -74,6 +74,9 @@ __pthread_cond_broadcast:
woken up. */
3: movl %ecx, (%ebx)
movl %eax, 4(%ebx)
+ movl %ecx, woken_seq-wakeup_seq(%ebx)
+ movl %eax, woken_seq-wakeup_seq+4(%ebx)
+ addl $1, broadcast_seq-wakeup_seq(%ebx)
/* Get the address of the mutex used. */
movl dep_mutex-wakeup_seq(%ebx), %edi
diff --git a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
index acc5a6a5f6..c0fd1a99a8 100644
--- a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
+++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
@@ -83,15 +83,17 @@ __pthread_cond_timedwait:
addl $1, total_seq(%ebx)
adcl $0, total_seq+4(%ebx)
-#define FRAME_SIZE 20
+#define FRAME_SIZE 24
subl $FRAME_SIZE, %esp
.Lsubl:
/* Get and store current wakeup_seq value. */
movl wakeup_seq(%ebx), %edi
movl wakeup_seq+4(%ebx), %edx
+ movl broadcast_seq(%ebx), %eax
movl %edi, 12(%esp)
movl %edx, 16(%esp)
+ movl %eax, 20(%esp)
/* Get the current time. */
8: movl %ebx, %edx
@@ -139,7 +141,8 @@ __pthread_cond_timedwait:
addl $1000000000, %edx
subl $1, %ecx
12: testl %ecx, %ecx
- js 13f
+ movl $-ETIMEDOUT, %esi
+ js 6f
/* Store relative timeout. */
21: movl %ecx, 4(%esp)
@@ -184,7 +187,11 @@ __pthread_cond_timedwait:
#endif
jnz 5f
-6: movl woken_seq(%ebx), %eax
+6: movl broadcast_seq(%ebx), %eax
+ cmpl 20(%esp), %eax
+ jne 23f
+
+ movl woken_seq(%ebx), %eax
movl woken_seq+4(%ebx), %ecx
movl wakeup_seq(%ebx), %edi
@@ -203,16 +210,19 @@ __pthread_cond_timedwait:
15: cmpl $-ETIMEDOUT, %esi
jne 8b
-13: addl $1, wakeup_seq(%ebx)
+ addl $1, wakeup_seq(%ebx)
adcl $0, wakeup_seq+4(%ebx)
movl $ETIMEDOUT, %esi
jmp 14f
+23: xorl %esi, %esi
+ jmp 24f
+
9: xorl %esi, %esi
14: addl $1, woken_seq(%ebx)
adcl $0, woken_seq+4(%ebx)
- LOCK
+24: LOCK
#if cond_lock == 0
subl $1, (%ebx)
#else
@@ -332,7 +342,8 @@ __pthread_cond_timedwait:
addl $1000000000, %edx
subl $1, %ecx
20: testl %ecx, %ecx
- js 13b
+ movl $-ETIMEDOUT, %esi
+ js 6b
jmp 21b
#endif
.size __pthread_cond_timedwait, .-__pthread_cond_timedwait
@@ -372,13 +383,17 @@ __condvar_tw_cleanup:
#endif
call __lll_mutex_lock_wait
-1: addl $1, wakeup_seq(%ebx)
+1: movl broadcast_seq(%ebx), %eax
+ cmpl 12(%esp), %eax
+ jne 3f
+
+ addl $1, wakeup_seq(%ebx)
adcl $0, wakeup_seq+4(%ebx)
addl $1, woken_seq(%ebx)
adcl $0, woken_seq+4(%ebx)
- LOCK
+3: LOCK
#if cond_lock == 0
subl $1, (%ebx)
#else
diff --git a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
index 08a0588910..74e3172ab0 100644
--- a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
+++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
@@ -80,15 +80,17 @@ __pthread_cond_wait:
addl $1, total_seq(%ebx)
adcl $0, total_seq+4(%ebx)
-#define FRAME_SIZE 12
+#define FRAME_SIZE 16
subl $FRAME_SIZE, %esp
.Lsubl:
/* Get and store current wakeup_seq value. */
movl wakeup_seq(%ebx), %edi
movl wakeup_seq+4(%ebx), %edx
+ movl broadcast_seq(%ebx), %eax
movl %edi, 4(%esp)
movl %edx, 8(%esp)
+ movl %eax, 12(%esp)
/* Unlock. */
8: LOCK
@@ -127,7 +129,11 @@ __pthread_cond_wait:
#endif
jnz 5f
-6: movl woken_seq(%ebx), %eax
+6: movl broadcast_seq(%ebx), %eax
+ cmpl 12(%esp), %eax
+ jne 16f
+
+ movl woken_seq(%ebx), %eax
movl woken_seq+4(%ebx), %ecx
movl wakeup_seq(%ebx), %edi
@@ -146,7 +152,8 @@ __pthread_cond_wait:
9: addl $1, woken_seq(%ebx)
adcl $0, woken_seq+4(%ebx)
- LOCK
+ /* Unlock */
+16: LOCK
#if cond_lock == 0
subl $1, (%ebx)
#else
@@ -264,13 +271,17 @@ __condvar_w_cleanup:
#endif
call __lll_mutex_lock_wait
-1: addl $1, wakeup_seq(%ebx)
+1: movl broadcast_seq(%ebx), %eax
+ cmpl 12(%esp), %eax
+ jne 3f
+
+ addl $1, wakeup_seq(%ebx)
adcl $0, wakeup_seq+4(%ebx)
addl $1, woken_seq(%ebx)
adcl $0, woken_seq+4(%ebx)
- LOCK
+3: LOCK
#if cond_lock == 0
subl $1, (%ebx)
#else