summaryrefslogtreecommitdiff
path: root/pthread_cond_destroy.c
diff options
context:
space:
mode:
authorrpj <rpj>2002-02-20 05:14:27 +0000
committerrpj <rpj>2002-02-20 05:14:27 +0000
commit9c3a441d6cfacb1ba2a728e63b887a8128338750 (patch)
treed9e6c8345a34249068f23c8666e985badceb95c7 /pthread_cond_destroy.c
parent0b88f4cb25866bcbb80f15374aa3981db932f62f (diff)
Enter the time change critical section earlier
Diffstat (limited to 'pthread_cond_destroy.c')
-rw-r--r--pthread_cond_destroy.c4
1 files changed, 2 insertions, 2 deletions
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;