summaryrefslogtreecommitdiff
path: root/global.c
diff options
context:
space:
mode:
authorrpj <rpj>2005-03-08 07:36:56 +0000
committerrpj <rpj>2005-03-08 07:36:56 +0000
commitd5c78e3656cbc7410f333bfa80e2929947e6d0e5 (patch)
tree9d47c7f9dc5022564a7c34ec1db8cca4e4d6d802 /global.c
parent6df0e45cf47b5eaee00f21a5862e8f0c5107a4e2 (diff)
compiler compatibility and bug fixes
Diffstat (limited to 'global.c')
-rw-r--r--global.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/global.c b/global.c
index 2b55422..18e8fa3 100644
--- a/global.c
+++ b/global.c
@@ -107,6 +107,17 @@ CRITICAL_SECTION ptw32_spinlock_test_init_lock;
*/
CRITICAL_SECTION ptw32_cond_list_lock;
+/*
+ * Global condition variable and mutex for once_control management.
+ * The mutex must be an ERRORCHECK type because we need to
+ * guarantee ownership when unlocking.
+ */
+ptw32_once_control_t ptw32_once_control =
+ {
+ PTHREAD_COND_INITIALIZER,
+ PTHREAD_ERRORCHECK_MUTEX_INITIALIZER
+ };
+
#ifdef _UWIN
/*
* Keep a count of the number of threads.