From 8c4d7f6bc1d365906724c92e4143fa021bf8a757 Mon Sep 17 00:00:00 2001 From: rpj Date: Wed, 14 Oct 1998 06:49:46 +0000 Subject: Wed Oct 14 21:09:24 1998 Ross Johnson * private.c (_pthread_new_thread): Increment _pthread_threads_count. (_pthread_delete_thread): Decrement _pthread_threads_count. Remove some comments. * exit.c (_pthread_exit): : Fix two pthread_mutex_lock() calls that should have been pthread_mutex_unlock() calls. (_pthread_vacuum): Remove call to _pthread_destructor_pop_all(). * create.c (pthread_create): Fix two pthread_mutex_lock() calls that should have been pthread_mutex_unlock() calls. * global.c (_pthread_tsd_mutex): Add mutex for TSD operations. * tsd.c (pthread_key_create): Add critical section. (pthread_setspecific): Ditto. (pthread_getspecific): Ditto. (pthread_key_delete): Ditto. * sync.c (pthread_join): Fix two pthread_mutex_lock() calls that should have been pthread_mutex_unlock() calls. --- exit.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'exit.c') diff --git a/exit.c b/exit.c index be7db75..3472dca 100644 --- a/exit.c +++ b/exit.c @@ -18,9 +18,6 @@ _pthread_vacuum(void) _pthread_handler_pop_all(_PTHREAD_CLEANUP_STACK, _PTHREAD_HANDLER_EXECUTE); - /* Run all TSD key destructors. */ - _pthread_destructor_pop_all(); - /* Pop any atfork handlers without executing them. */ _pthread_handler_pop_all(_PTHREAD_FORKPREPARE_STACK, _PTHREAD_HANDLER_NOEXECUTE); @@ -44,7 +41,7 @@ _pthread_exit(pthread_t thread, void * value, int return_code) to any joining threads. */ thread->joinvalueptr = value; - pthread_mutex_lock(&_pthread_table_mutex); + pthread_mutex_unlock(&_pthread_table_mutex); /* END CRITICAL SECTION */ _pthread_vacuum(); @@ -64,7 +61,7 @@ _pthread_exit(pthread_t thread, void * value, int return_code) (void) _pthread_delete_thread(thread); } - pthread_mutex_lock(&_pthread_table_mutex); + pthread_mutex_unlock(&_pthread_table_mutex); /* END CRITICAL SECTION */ _endthreadex(return_code); -- cgit v1.2.3