From 514f53305f6c42256c672d552aa9d477c1266163 Mon Sep 17 00:00:00 2001 From: rpj Date: Sat, 25 Jul 1998 14:51:07 +0000 Subject: Sun Jul 26 00:09:59 1998 Ross Johnson * condvar.c (cond_wait): Add cancelation point. This applies the point to both pthread_cond_wait() and pthread_cond_timedwait(). * exit.c (pthread_exit): Rename "this" to "us". * implement.h: Add comment. * sync.c (pthread_join): I've satisfied myself that pthread_detach() does set the detached attribute in the thread entry attributes to PTHREAD_CREATE_DETACHED. "if" conditions were changed to test that attribute instead of a separate flag. * create.c (pthread_create): Rename "this" to "us". (pthread_create): cancelstate and canceltype are not attributes so the copy to thread entry attribute storage was removed. Only the thread itself can change it's cancelstate or canceltype, ie. the thread must exist already. --- exit.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'exit.c') diff --git a/exit.c b/exit.c index 70fc7f2..b9d5a2d 100644 --- a/exit.c +++ b/exit.c @@ -33,17 +33,15 @@ _pthread_vacuum(void) void pthread_exit(void * value) { - _pthread_threads_thread_t * this; - - this = _PTHREAD_THIS; + _pthread_threads_thread_t * us = _PTHREAD_THIS; /* Copy value into the thread entry so it can be given to any joining threads. */ - if (this->joinvalueptr != NULL) + if (us->joinvalueptr != NULL) { - this->joinvalueptr = value; + us->joinvalueptr = value; } /* Teleport back to _pthread_start_call() to cleanup and exit. */ - longjmp(this->call.env, 1); + longjmp(us->call.env, 1); } -- cgit v1.2.3