+2003-07-08 Jakub Jelinek <jakub@redhat.com>
+
+ * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
+ __pthread_unregister_cancel): Add prototypes and hidden_proto.
+ * unwind.c (__pthread_unwind_next): Add hidden_def.
+ * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
+ Likewise.
+ * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
+ Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
+ * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
+ Likewise.
+ * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
+ * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
+ Likewise.
+ * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
+ HIDDEN_JUMPTARGET to call __pthread_register_cancel,
+ __pthread_unregister_cancel and __pthread_unwind_next.
+
2003-07-04 Jakub Jelinek <jakub@redhat.com>
* sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
/* Store the new cleanup handler info. */
THREAD_SETMEM (self, cleanup_jmp_buf, (struct pthread_unwind_buf *) buf);
}
+hidden_def (__pthread_register_cancel)
void
THREAD_SETMEM (THREAD_SELF, cleanup_jmp_buf, ibuf->priv.data.prev);
}
+hidden_def (__pthread_unregister_cancel)
weak_function
#endif
;
+extern void __pthread_unwind_next (__pthread_unwind_buf_t *__buf)
+ __cleanup_fct_attribute __attribute ((__noreturn__))
+#ifndef SHARED
+ weak_function
+#endif
+ ;
+extern void __pthread_register_cancel (__pthread_unwind_buf_t *__buf)
+ __cleanup_fct_attribute;
+extern void __pthread_unregister_cancel (__pthread_unwind_buf_t *__buf)
+ __cleanup_fct_attribute;
#if defined NOT_IN_libc && defined IS_IN_libpthread
hidden_proto (__pthread_unwind)
+hidden_proto (__pthread_unwind_next)
+hidden_proto (__pthread_register_cancel)
+hidden_proto (__pthread_unregister_cancel)
#endif
LOCK
orl $0x10, %gs:CANCELHANDLING
movl %gs:CLEANUP_JMP_BUF, %eax
- jmp __pthread_unwind
+ jmp HIDDEN_JUMPTARGET (__pthread_unwind)
cfi_endproc
.size sem_timedwait,.-sem_timedwait
LOCK
orl $0x10, %gs:CANCELHANDLING
movl %gs:CLEANUP_JMP_BUF, %eax
- jmp __pthread_unwind
+ jmp HIDDEN_JUMPTARGET (__pthread_unwind)
cfi_endproc
.size __new_sem_wait,.-__new_sem_wait
versioned_symbol(libpthread, __new_sem_wait, sem_wait, GLIBC_2_1)
jne 7f
leal 8(%esp), %eax
- call __pthread_register_cancel
+ call HIDDEN_JUMPTARGET(__pthread_register_cancel)
/* Call the user-provided initialization function. */
call *24+UNWINDBUFSIZE(%esp)
/* Pop the cleanup handler. */
leal 8(%esp), %eax
- call __pthread_unregister_cancel
+ call HIDDEN_JUMPTARGET(__pthread_unregister_cancel)
addl $UNWINDBUFSIZE+8, %esp
cfi_adjust_cfa_offset (-UNWINDBUFSIZE-8)
ENTER_KERNEL
leal 8(%esp), %eax
- call __pthread_unwind_next /* Note: no @PLT. */
+ call HIDDEN_JUMPTARGET (__pthread_unwind_next)
/* NOTREACHED */
hlt
cfi_endproc
LOCK
orl $0x10, %fs:CANCELHANDLING
movq %fs:CLEANUP_JMP_BUF, %rdi
- jmp __pthread_unwind
+ jmp HIDDEN_JUMPTARGET (__pthread_unwind)
cfi_endproc
.size sem_timedwait,.-sem_timedwait
LOCK
orl $0x10, %fs:CANCELHANDLING
movq %fs:CLEANUP_JMP_BUF, %rdi
- jmp __pthread_unwind
+ jmp HIDDEN_JUMPTARGET (__pthread_unwind)
cfi_endproc
.size sem_wait,.-sem_wait
__pthread_unwind ((__pthread_unwind_buf_t *) ibuf->priv.data.prev);
}
+hidden_def (__pthread_unwind_next)