diff options
author | rpj <rpj> | 2002-02-20 05:14:27 +0000 |
---|---|---|
committer | rpj <rpj> | 2002-02-20 05:14:27 +0000 |
commit | 9c3a441d6cfacb1ba2a728e63b887a8128338750 (patch) | |
tree | d9e6c8345a34249068f23c8666e985badceb95c7 | |
parent | 0b88f4cb25866bcbb80f15374aa3981db932f62f (diff) |
Enter the time change critical section earlier
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | pthread_cond_destroy.c | 4 |
2 files changed, 7 insertions, 2 deletions
@@ -1,3 +1,8 @@ +2002-02-20 Ross Johnson <rpj@setup1.ise.canberra.edu.au> + + * pthread_cond_destroy.c (pthread_cond_destroy): + Enter the time change critical section earlier. + 2002-02-17 Ross Johnson <rpj@setup1.ise.canberra.edu.au * Testsuite passed. 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; |