summaryrefslogtreecommitdiff
path: root/pthread_cond_wait.c
diff options
context:
space:
mode:
authorrpj <rpj>2004-11-19 06:35:44 +0000
committerrpj <rpj>2004-11-19 06:35:44 +0000
commitd9cc4e4d78d432929c276bd44b0aaff86b65023e (patch)
treeaf7d430a0bbfc8ad8fc379ece0a56827c942d74b /pthread_cond_wait.c
parent74a7f736180868ab00ca03df61c7c48af6200157 (diff)
Reverse last change.
Diffstat (limited to 'pthread_cond_wait.c')
-rw-r--r--pthread_cond_wait.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/pthread_cond_wait.c b/pthread_cond_wait.c
index 241f464..1dd12e5 100644
--- a/pthread_cond_wait.c
+++ b/pthread_cond_wait.c
@@ -9,7 +9,7 @@
*
* Pthreads-win32 - POSIX Threads Library for Win32
* Copyright(C) 1998 John E. Bossom
- * Copyright(C) 1999,2003 Pthreads-win32 contributors
+ * Copyright(C) 1999,2004 Pthreads-win32 contributors
*
* Contact Email: rpj@callisto.canberra.edu.au
*
@@ -284,17 +284,6 @@ ptw32_cond_wait_cleanup (void *args)
int result;
/*
- * XSH: Upon successful return, the mutex has been locked and is owned
- * by the calling thread. This must be done before any cancelation
- * cleanup handlers are run.
- */
- if ((result = pthread_mutex_lock (cleanup_args->mutexPtr)) != 0)
- {
- *resultPtr = result;
- return;
- }
-
- /*
* Whether we got here as a result of signal/broadcast or because of
* timeout on wait or thread cancellation we indicate that we are no
* longer waiting. The waiter is responsible for adjusting waiters
@@ -351,6 +340,16 @@ ptw32_cond_wait_cleanup (void *args)
return;
}
}
+
+ /*
+ * XSH: Upon successful return, the mutex has been locked and is owned
+ * by the calling thread.
+ */
+ if ((result = pthread_mutex_lock (cleanup_args->mutexPtr)) != 0)
+ {
+ *resultPtr = result;
+ return;
+ }
} /* ptw32_cond_wait_cleanup */
static INLINE int