From a50745ec922a917513029f3f87bf820827b43f29 Mon Sep 17 00:00:00 2001 From: rpj Date: Thu, 14 Aug 2003 08:53:17 +0000 Subject: Reuse of thread IDs, improved thread ID validation, new tests, bug fixes. --- global.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'global.c') diff --git a/global.c b/global.c index d541aa4..7a4dc5c 100644 --- a/global.c +++ b/global.c @@ -40,6 +40,7 @@ int ptw32_processInitialized = FALSE; +pthread_t ptw32_threadReuseTop = PTW32_THREAD_REUSE_BOTTOM; pthread_key_t ptw32_selfThreadKey = NULL; pthread_key_t ptw32_cleanupKey = NULL; pthread_cond_t ptw32_cond_list_head = NULL; @@ -55,6 +56,11 @@ PTW32_INTERLOCKED_LONG PTW32_INTERLOCKED_LONG, PTW32_INTERLOCKED_LONG) = NULL; +/* + * Global lock for managing pthread_t struct reuse. + */ +CRITICAL_SECTION ptw32_thread_reuse_lock; + /* * Global lock for testing internal state of PTHREAD_MUTEX_INITIALIZER * created mutexes. -- cgit v1.2.3