summaryrefslogtreecommitdiff
path: root/global.c
diff options
context:
space:
mode:
authorrpj <rpj>1998-10-14 06:49:46 +0000
committerrpj <rpj>1998-10-14 06:49:46 +0000
commit8c4d7f6bc1d365906724c92e4143fa021bf8a757 (patch)
treedc7b4b1c3da43374d078f85277ecf61044b7a921 /global.c
parent4ed54ca07b8115bd9e7813a1484d4c7936a25e70 (diff)
Wed Oct 14 21:09:24 1998 Ross Johnson <rpj@ixobrychus.canberra.edu.au>
* 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.
Diffstat (limited to 'global.c')
-rw-r--r--global.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/global.c b/global.c
index 9ce662f..ee6de82 100644
--- a/global.c
+++ b/global.c
@@ -60,5 +60,8 @@ pthread_mutex_t _pthread_threads_mutex_table[_PTHREAD_MAX_THREADS];
/* Global TSD key array. */
_pthread_tsd_key_t _pthread_tsd_key_table[_POSIX_THREAD_KEYS_MAX];
+/* Mutex lock for TSD operations */
+pthread_mutex_t _pthread_tsd_mutex = PTHREAD_MUTEX_INITIALIZER;
+
/* Index to the next available TSD key. */
int _pthread_tsd_key_next = 0;