summaryrefslogtreecommitdiff
path: root/linuxthreads/join.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-04-10 21:46:48 +0000
committerUlrich Drepper <drepper@redhat.com>2001-04-10 21:46:48 +0000
commit58f46c794a3dc049ae8c53dab76d83ea23408479 (patch)
tree5695211b81ee73dc571857728e377b59a6938d92 /linuxthreads/join.c
parentbf9d1166a06c7181e50d7d5c9a2cde665007ee1d (diff)
Update.
2001-04-10 Martin Schwidefsky <schwidefsky@de.ibm.com> * sysdeps/unix/sysv/linux/s390/s390-32/getcontext.S: Fix return value of getcontext. * sysdeps/unix/sysv/linux/s390/s390-64/getcontext.S: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/setcontext.S: Fix return value of setcontext. * sysdeps/unix/sysv/linux/s390/s390-64/setcontext.S: Likewise. * sysdeps/unix/sysv/linux/s390/swapcontext.c: Skip setcontext call by changing the saved context.
Diffstat (limited to 'linuxthreads/join.c')
-rw-r--r--linuxthreads/join.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/linuxthreads/join.c b/linuxthreads/join.c
index bbcebe12ae..a0cdb41cd3 100644
--- a/linuxthreads/join.c
+++ b/linuxthreads/join.c
@@ -25,6 +25,11 @@
void pthread_exit(void * retval)
{
+ __pthread_do_exit (retval, CURRENT_STACK_FRAME);
+}
+
+void __pthread_do_exit(void *retval, char *currentframe)
+{
pthread_descr self = thread_self();
pthread_descr joining;
struct pthread_request request;
@@ -33,7 +38,7 @@ void pthread_exit(void * retval)
contain cancellation points */
THREAD_SETMEM(self, p_canceled, 0);
/* Call cleanup functions and destroy the thread-specific data */
- __pthread_perform_cleanup();
+ __pthread_perform_cleanup(currentframe);
__pthread_destroy_specifics();
/* Store return value */
__pthread_lock(THREAD_GETMEM(self, p_lock), self);
@@ -144,7 +149,7 @@ int pthread_join(pthread_t thread_id, void ** thread_return)
if (already_canceled) {
__pthread_set_own_extricate_if(self, 0);
- pthread_exit(PTHREAD_CANCELED);
+ __pthread_do_exit(PTHREAD_CANCELED, CURRENT_STACK_FRAME);
}
suspend(self);
@@ -155,7 +160,7 @@ int pthread_join(pthread_t thread_id, void ** thread_return)
if (THREAD_GETMEM(self, p_woken_by_cancel)
&& THREAD_GETMEM(self, p_cancelstate) == PTHREAD_CANCEL_ENABLE) {
THREAD_SETMEM(self, p_woken_by_cancel, 0);
- pthread_exit(PTHREAD_CANCELED);
+ __pthread_do_exit(PTHREAD_CANCELED, CURRENT_STACK_FRAME);
}
__pthread_lock(&handle->h_lock, self);
}