diff options
author | rpj <rpj> | 1999-01-03 16:41:14 +0000 |
---|---|---|
committer | rpj <rpj> | 1999-01-03 16:41:14 +0000 |
commit | 5ab9f5892826bb1c4e45b4dcb2692d4eb2f813f1 (patch) | |
tree | 055390c239a2f7cefdde4360a5f0f0096be19930 /exit.c | |
parent | 63d8161801576f3acd5169b472946f4a687c4728 (diff) |
Mon Jan 4 11:23:40 1999 Ross Johnson <rpj@ixobrychus.canberra.edu.au>bossom-merge-99-01-04bossom-merge-98-12-08
* all: No code changes, just cleanup.
- remove #if 0 /* Pre Bossom */ enclosed code.
- Remove some redundant #includes.
* pthread.h: Update implemented/unimplemented routines list.
* Tag the bossom merge branch getting ready to merge back to main
trunk.
Diffstat (limited to 'exit.c')
-rw-r--r-- | exit.c | 68 |
1 files changed, 0 insertions, 68 deletions
@@ -6,8 +6,6 @@ * a thread. */ -#include <windows.h> -#include <process.h> #include "pthread.h" #include "implement.h" @@ -49,69 +47,3 @@ pthread_exit (void *value_ptr) /* </JEB> */ - -#if 0 /* Pre Bossom */ - -void -_pthread_vacuum(void) -{ - /* Run all the handlers. */ - _pthread_handler_pop_all(_PTHREAD_CLEANUP_STACK, - _PTHREAD_HANDLER_EXECUTE); - - /* Pop any atfork handlers without executing them. */ - _pthread_handler_pop_all(_PTHREAD_FORKPREPARE_STACK, - _PTHREAD_HANDLER_NOEXECUTE); - - _pthread_handler_pop_all(_PTHREAD_FORKPARENT_STACK, - _PTHREAD_HANDLER_NOEXECUTE); - - _pthread_handler_pop_all(_PTHREAD_FORKCHILD_STACK, - _PTHREAD_HANDLER_NOEXECUTE); -} - -void -_pthread_exit(pthread_t thread, void * value, int return_code) -{ - int detachstate; - - /* CRITICAL SECTION */ - pthread_mutex_lock(&_pthread_table_mutex); - - /* Copy value into the thread entry so it can be given - to any joining threads. */ - thread->joinvalueptr = value; - - pthread_mutex_unlock(&_pthread_table_mutex); - /* END CRITICAL SECTION */ - - _pthread_vacuum(); - - /* CRITICAL SECTION */ - pthread_mutex_lock(&_pthread_table_mutex); - - /* Remove the thread entry on exit only if the thread is detached - AND there are no waiting joins. Otherwise the thread entry will - be deleted by the last waiting pthread_join() after this thread - has terminated. */ - - if (pthread_attr_getdetachstate(&thread->attr, &detachstate) == 0 - && detachstate == PTHREAD_CREATE_DETACHED - && thread->join_count == 0) - { - (void) _pthread_delete_thread(thread); - } - - pthread_mutex_unlock(&_pthread_table_mutex); - /* END CRITICAL SECTION */ - - _endthreadex(return_code); -} - -void -pthread_exit(void * value) -{ - _pthread_exit(pthread_self(), value, 0); -} - -#endif /* Pre Bossom */ |