aboutsummaryrefslogtreecommitdiff
path: root/nptl
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-04-13 08:04:46 +0000
committerUlrich Drepper <drepper@redhat.com>2003-04-13 08:04:46 +0000
commit08c765fa6e664c584659a476dadfc926d6c74254 (patch)
tree384ba1fecb63bf12fa1fb08a353c343341e8740d /nptl
parent7cc1894ca82cb5709205eed6adfbb002ab02de79 (diff)
downloadglibc-08c765fa6e664c584659a476dadfc926d6c74254.tar
glibc-08c765fa6e664c584659a476dadfc926d6c74254.tar.gz
glibc-08c765fa6e664c584659a476dadfc926d6c74254.tar.bz2
glibc-08c765fa6e664c584659a476dadfc926d6c74254.zip
Update.
2003-04-13 Ulrich Drepper <drepper@redhat.com> * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Add unwind info. * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise. * Makefile: Make sure all cancellation points are compiled with exception and asynchronous unwind tables.
Diffstat (limited to 'nptl')
-rw-r--r--nptl/ChangeLog9
-rw-r--r--nptl/Makefile5
-rw-r--r--nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S124
-rw-r--r--nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S106
4 files changed, 241 insertions, 3 deletions
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index d6aa004c42..9066a7c475 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,5 +1,14 @@
+2003-04-13 Ulrich Drepper <drepper@redhat.com>
+
+ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Add
+ unwind info.
+ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
+
2003-04-12 Ulrich Drepper <drepper@redhat.com>
+ * Makefile: Make sure all cancellation points are compiled with
+ exception and asynchronous unwind tables.
+
* sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
which mishandles loading of global object addresses in PIC.
(THREAD_SETMEM_NC): Likewise.
diff --git a/nptl/Makefile b/nptl/Makefile
index 79d28c9a30..4de004a514 100644
--- a/nptl/Makefile
+++ b/nptl/Makefile
@@ -125,6 +125,11 @@ libpthread-nonshared = pthread_atfork
CFLAGS-pthread_atfork.c = -DNOT_IN_libc
CFLAGS-init.c = -fexceptions -fasynchronous-unwind-tables
CFLAGS-unwind.c = -fexceptions
+CFLAGS-pthread_testcancel.c = -fexceptions
+CFLAGS-pthread_join.c = -fexceptions -fasynchronous-unwind-tables
+CFLAGS-pthread_timedjoin.c = -fexceptions -fasynchronous-unwind-tables
+CFLAGS-pthread_cond_wait.c = -fexceptions -fasynchronous-unwind-tables
+CFLAGS-pthread_cond_timedwait.c = -fexceptions -fasynchronous-unwind-tables
CFLAGS-cancellation.c = -fasynchronous-unwind-tables
CFLAGS-libc-cancellation.c = -fasynchronous-unwind-tables
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 dc77ee7e7d..04db819267 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
@@ -42,11 +42,15 @@
.type __pthread_cond_timedwait, @function
.align 16
__pthread_cond_timedwait:
-
+.LSTARTCODE:
pushl %ebp
+.Lpush_ebp:
pushl %edi
+.Lpush_edi:
pushl %esi
+.Lpush_esi:
pushl %ebx
+.Lpush_ebx:
movl 20(%esp), %ebx
movl 28(%esp), %ebp
@@ -64,6 +68,7 @@ __pthread_cond_timedwait:
/* Unlock the mutex. */
2: pushl 24(%esp)
+.Lpush4:
call __pthread_mutex_unlock_internal
testl %eax, %eax
@@ -81,6 +86,7 @@ __pthread_cond_timedwait:
leal __condvar_cleanup, %eax
#endif
subl $40, %esp
+.Lsubl:
leal 28(%esp), %edx
movl %esp, 8(%esp)
movl %eax, 4(%esp)
@@ -226,20 +232,26 @@ __pthread_cond_timedwait:
/* Trick ahead: (%esp) contains the address of the mutex. */
call __pthread_mutex_lock_internal
addl $44, %esp
+.Laddl:
/* We return the result of the mutex_lock operation if it failed. */
testl %eax, %eax
cmovel %esi, %eax
18: popl %ebx
+.Lpop_ebx:
popl %esi
+.Lpop_esi:
popl %edi
+.Lpop_edi:
popl %ebp
+.Lpop_ebp:
ret
/* Initial locking failed. */
1:
+.LSbl1:
#if cond_lock == 0
movl %ebx, %ecx
#else
@@ -250,6 +262,7 @@ __pthread_cond_timedwait:
/* Unlock in loop requires waekup. */
3:
+.LSbl2:
#if cond_lock == 0
movl %ebx, %eax
#else
@@ -279,7 +292,9 @@ __pthread_cond_timedwait:
jmp 11b
/* The initial unlocking of the mutex failed. */
-16: movl %eax, (%esp)
+16:
+.LSbl3:
+ movl %eax, (%esp)
LOCK
#if cond_lock == 0
subl $1, (%ebx)
@@ -300,6 +315,7 @@ __pthread_cond_timedwait:
#if defined __NR_clock_gettime && !defined __ASSUME_POSIX_TIMERS
/* clock_gettime not available. */
+.LSbl4:
19: leal 12(%esp), %ebx
xorl %ecx, %ecx
movl $SYS_gettimeofday, %eax
@@ -321,6 +337,110 @@ __pthread_cond_timedwait:
js 13b
jmp 21b
#endif
+.LENDCODE:
.size __pthread_cond_timedwait, .-__pthread_cond_timedwait
versioned_symbol (libpthread, __pthread_cond_timedwait, pthread_cond_timedwait,
GLIBC_2_3_2)
+
+
+ .section .eh_frame,"a",@progbits
+.LSTARTFRAME:
+ .long L(ENDCIE)-L(STARTCIE) # Length of the CIE.
+.LSTARTCIE:
+ .long 0 # CIE ID.
+ .byte 1 # Version number.
+#ifdef SHARED
+ .string "zR" # NUL-terminated augmentation string.
+#else
+ .ascii "\0" # NUL-terminated augmentation string.
+#endif
+ .uleb128 1 # Code alignment factor.
+ .sleb128 -4 # Data alignment factor.
+ .byte 8 # Return address register column.
+#ifdef SHARED
+ .uleb128 1 # Augmentation value length.
+ .byte 0x1b # Encoding: DW_EH_PE_pcrel
+ # + DW_EH_PE_sdata4.
+#endif
+ .byte 0x0c # DW_CFA_def_cfa
+ .uleb128 4
+ .uleb128 4
+ .byte 0x88 # DW_CFA_offset, column 0x8
+ .uleb128 1
+ .align 4
+.LENDCIE:
+
+ .long .LENDFDE-.LSTARTFDE # Length of the FDE.
+.LSTARTFDE:
+ .long .LSTARTFDE-.LSTARTFRAME # CIE pointer.
+#ifdef SHARED
+ .long .LSTARTCODE-. # PC-relative start address of the code
+#else
+ .long .LSTARTCODE # Start address of the code.
+#endif
+ .long .LENDCODE-.LSTARTCODE # Length of the code.
+ .uleb128 0 # No augmentation data.
+ .byte 4 # DW_CFA_advance_loc4
+ .long .Lpush_ebp-.LSTARTCODE
+ .byte 14 # DW_CFA_def_cfa_offset
+ .uleb128 8
+ .byte 4 # DW_CFA_advance_loc4
+ .long .Lpush_edi-.Lpush_ebp
+ .byte 14 # DW_CFA_def_cfa_offset
+ .uleb128 12
+ .byte 4 # DW_CFA_advance_loc4
+ .long .Lpush_esi-.Lpush_edi
+ .byte 14 # DW_CFA_def_cfa_offset
+ .uleb128 16
+ .byte 4 # DW_CFA_advance_loc4
+ .long .Lpush_ebx-.Lpush_esi
+ .byte 14 # DW_CFA_def_cfa_offset
+ .uleb128 20
+ .byte 4 # DW_CFA_advance_loc4
+ .long .Lpush4-.Lpush_ebx
+ .byte 14 # DW_CFA_def_cfa_offset
+ .uleb128 24
+ .byte 4 # DW_CFA_advance_loc4
+ .long .Lsubl-.Lpush4
+ .byte 14 # DW_CFA_def_cfa_offset
+ .uleb128 64
+ .byte 4 # DW_CFA_advance_loc4
+ .long .Laddl-.Lsubl
+ .byte 14 # DW_CFA_def_cfa_offset
+ .uleb128 20
+ .byte 4 # DW_CFA_advance_loc4
+ .long .Lpop_ebx-.Laddl
+ .byte 14 # DW_CFA_def_cfa_offset
+ .uleb128 16
+ .byte 4 # DW_CFA_advance_loc4
+ .long .Lpop_esi-.Lpop_ebx
+ .byte 14 # DW_CFA_def_cfa_offset
+ .uleb128 12
+ .byte 4 # DW_CFA_advance_loc4
+ .long .Lpop_edi-.Lpop_esi
+ .byte 14 # DW_CFA_def_cfa_offset
+ .uleb128 8
+ .byte 4 # DW_CFA_advance_loc4
+ .long .Lpop_ebp-.Lpop_edi
+ .byte 14 # DW_CFA_def_cfa_offset
+ .uleb128 4
+ .byte 4 # DW_CFA_advance_loc4
+ .long .LSbl1-.Lpop_edi
+ .byte 14 # DW_CFA_def_cfa_offset
+ .uleb128 20
+ .byte 4 # DW_CFA_advance_loc4
+ .long .LSbl2-.LSbl1
+ .byte 14 # DW_CFA_def_cfa_offset
+ .uleb128 64
+ .byte 4 # DW_CFA_advance_loc4
+ .long .LSbl3-.LSbl2
+ .byte 14 # DW_CFA_def_cfa_offset
+ .uleb128 24
+#if defined __NR_clock_gettime && !defined __ASSUME_POSIX_TIMERS
+ .byte 4 # DW_CFA_advance_loc4
+ .long .LSbl4-.LSbl3
+ .byte 14 # DW_CFA_def_cfa_offset
+ .uleb128 64
+#endif
+ .align 4
+.LENDFDE:
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 47bdf94948..72dcf4d653 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
@@ -102,10 +102,14 @@ __condvar_cleanup:
.type __pthread_cond_wait, @function
.align 16
__pthread_cond_wait:
+.LSTARTCODE:
pushl %edi
+.Lpush_edi:
pushl %esi
+.Lpush_esi:
pushl %ebx
+.Lpush_ebx:
xorl %esi, %esi
movl 16(%esp), %ebx
@@ -123,6 +127,7 @@ __pthread_cond_wait:
/* Unlock the mutex. */
2: pushl 20(%esp)
+.Lpush4:
call __pthread_mutex_unlock_internal
testl %eax, %eax
@@ -140,6 +145,7 @@ __pthread_cond_wait:
leal __condvar_cleanup, %eax
#endif
subl $32, %esp
+.Lsubl:
leal 20(%esp), %edx
movl %esp, 8(%esp)
movl %eax, 4(%esp)
@@ -225,16 +231,21 @@ __pthread_cond_wait:
/* Trick ahead: (%esp) contains the address of the mutex. */
call __pthread_mutex_lock_internal
addl $36, %esp
+.Laddl:
14: popl %ebx
+.Lpop_ebx:
popl %esi
+.Lpop_esi:
popl %edi
+.Lpop_edi:
/* We return the result of the mutex_lock operation. */
ret
/* Initial locking failed. */
1:
+.LSbl1:
#if cond_lock == 0
movl %ebx, %ecx
#else
@@ -245,6 +256,7 @@ __pthread_cond_wait:
/* Unlock in loop requires waekup. */
3:
+.LSbl2:
#if cond_lock == 0
movl %ebx, %eax
#else
@@ -274,7 +286,9 @@ __pthread_cond_wait:
jmp 11b
/* The initial unlocking of the mutex failed. */
-12: movl %eax, (%esp)
+12:
+.LSbl3:
+ movl %eax, (%esp)
LOCK
#if cond_lock == 0
subl $1, (%ebx)
@@ -292,11 +306,101 @@ __pthread_cond_wait:
13: popl %eax
jmp 14b
+.LENDCODE:
.size __pthread_cond_wait, .-__pthread_cond_wait
versioned_symbol (libpthread, __pthread_cond_wait, pthread_cond_wait,
GLIBC_2_3_2)
+ .section .eh_frame,"a",@progbits
+.LSTARTFRAME:
+ .long L(ENDCIE)-L(STARTCIE) # Length of the CIE.
+.LSTARTCIE:
+ .long 0 # CIE ID.
+ .byte 1 # Version number.
+#ifdef SHARED
+ .string "zR" # NUL-terminated augmentation string.
+#else
+ .ascii "\0" # NUL-terminated augmentation string.
+#endif
+ .uleb128 1 # Code alignment factor.
+ .sleb128 -4 # Data alignment factor.
+ .byte 8 # Return address register column.
+#ifdef SHARED
+ .uleb128 1 # Augmentation value length.
+ .byte 0x1b # Encoding: DW_EH_PE_pcrel
+ # + DW_EH_PE_sdata4.
+#endif
+ .byte 0x0c # DW_CFA_def_cfa
+ .uleb128 4
+ .uleb128 4
+ .byte 0x88 # DW_CFA_offset, column 0x8
+ .uleb128 1
+ .align 4
+.LENDCIE:
+
+ .long .LENDFDE-.LSTARTFDE # Length of the FDE.
+.LSTARTFDE:
+ .long .LSTARTFDE-.LSTARTFRAME # CIE pointer.
+#ifdef SHARED
+ .long .LSTARTCODE-. # PC-relative start address of the code
+#else
+ .long .LSTARTCODE # Start address of the code.
+#endif
+ .long .LENDCODE-.LSTARTCODE # Length of the code.
+ .uleb128 0 # No augmentation data.
+ .byte 4 # DW_CFA_advance_loc4
+ .long .Lpush_edi-.LSTARTCODE
+ .byte 14 # DW_CFA_def_cfa_offset
+ .uleb128 8
+ .byte 4 # DW_CFA_advance_loc4
+ .long .Lpush_esi-.Lpush_edi
+ .byte 14 # DW_CFA_def_cfa_offset
+ .uleb128 12
+ .byte 4 # DW_CFA_advance_loc4
+ .long .Lpush_ebx-.Lpush_esi
+ .byte 14 # DW_CFA_def_cfa_offset
+ .uleb128 16
+ .byte 4 # DW_CFA_advance_loc4
+ .long .Lpush4-.Lpush_ebx
+ .byte 14 # DW_CFA_def_cfa_offset
+ .uleb128 20
+ .byte 4 # DW_CFA_advance_loc4
+ .long .Lsubl-.Lpush4
+ .byte 14 # DW_CFA_def_cfa_offset
+ .uleb128 52
+ .byte 4 # DW_CFA_advance_loc4
+ .long .Laddl-.Lsubl
+ .byte 14 # DW_CFA_def_cfa_offset
+ .uleb128 16
+ .byte 4 # DW_CFA_advance_loc4
+ .long .Lpop_ebx-.Laddl
+ .byte 14 # DW_CFA_def_cfa_offset
+ .uleb128 12
+ .byte 4 # DW_CFA_advance_loc4
+ .long .Lpop_esi-.Lpop_ebx
+ .byte 14 # DW_CFA_def_cfa_offset
+ .uleb128 8
+ .byte 4 # DW_CFA_advance_loc4
+ .long .Lpop_edi-.Lpop_esi
+ .byte 14 # DW_CFA_def_cfa_offset
+ .uleb128 4
+ .byte 4 # DW_CFA_advance_loc4
+ .long .LSbl1-.Lpop_edi
+ .byte 14 # DW_CFA_def_cfa_offset
+ .uleb128 16
+ .byte 4 # DW_CFA_advance_loc4
+ .long .LSbl2-.LSbl1
+ .byte 14 # DW_CFA_def_cfa_offset
+ .uleb128 52
+ .byte 4 # DW_CFA_advance_loc4
+ .long .LSbl3-.LSbl2
+ .byte 14 # DW_CFA_def_cfa_offset
+ .uleb128 20
+ .align 4
+.LENDFDE:
+
+
#ifdef PIC
.section .gnu.linkonce.t.__i686.get_pc_thunk.cx,"ax",@progbits
.globl __i686.get_pc_thunk.cx