From ec8290acdaea21b16d98f1ef5d4ae8a28ab2109a Mon Sep 17 00:00:00 2001 From: rpj Date: Wed, 3 Nov 2004 01:08:41 +0000 Subject: Mutex, semaphore, thread ID, test suite changes - see ChangeLogs --- ptw32_processTerminate.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'ptw32_processTerminate.c') diff --git a/ptw32_processTerminate.c b/ptw32_processTerminate.c index 13d73aa..b36c5a7 100644 --- a/ptw32_processTerminate.c +++ b/ptw32_processTerminate.c @@ -62,10 +62,9 @@ ptw32_processTerminate (void) * ------------------------------------------------------ */ { - pthread_t thread, nextThread; - if (ptw32_processInitialized) { + ptw32_thread_t * tp, * tpNext; if (ptw32_selfThreadKey != NULL) { @@ -89,12 +88,12 @@ ptw32_processTerminate (void) EnterCriticalSection (&ptw32_thread_reuse_lock); - thread = ptw32_threadReuseTop; - while (thread != PTW32_THREAD_REUSE_BOTTOM) + tp = ptw32_threadReuseTop; + while (tp != PTW32_THREAD_REUSE_EMPTY) { - nextThread = thread->prevReuse; - free (thread); - thread = nextThread; + tpNext = tp->prevReuse; + free (tp); + tp = tpNext; } LeaveCriticalSection (&ptw32_thread_reuse_lock); -- cgit v1.2.3