From 9c3a441d6cfacb1ba2a728e63b887a8128338750 Mon Sep 17 00:00:00 2001 From: rpj Date: Wed, 20 Feb 2002 05:14:27 +0000 Subject: Enter the time change critical section earlier --- pthread_cond_destroy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pthread_cond_destroy.c') diff --git a/pthread_cond_destroy.c b/pthread_cond_destroy.c index f5102ac..5eab110 100644 --- a/pthread_cond_destroy.c +++ b/pthread_cond_destroy.c @@ -168,6 +168,8 @@ pthread_cond_destroy (pthread_cond_t * cond) /* * Now it is safe to destroy */ + EnterCriticalSection(&ptw32_cond_list_lock); + *cond = NULL; if (sem_destroy(&(cv->semBlockLock)) != 0) @@ -185,8 +187,6 @@ pthread_cond_destroy (pthread_cond_t * cond) /* Unlink the CV from the list */ - EnterCriticalSection(&ptw32_cond_list_lock); - if (ptw32_cond_list_head == cv) { ptw32_cond_list_head = cv->next; -- cgit v1.2.3