summaryrefslogtreecommitdiffstats
path: root/win/tclWinThrd.c
diff options
context:
space:
mode:
Diffstat (limited to 'win/tclWinThrd.c')
-rw-r--r--win/tclWinThrd.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/win/tclWinThrd.c b/win/tclWinThrd.c
index e3227b1..8fe2596 100644
--- a/win/tclWinThrd.c
+++ b/win/tclWinThrd.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclWinThrd.c,v 1.7 2000/04/17 20:32:26 welch Exp $
+ * RCS: @(#) $Id: tclWinThrd.c,v 1.8 2000/04/20 01:30:20 hobbs Exp $
*/
#include "tclWinInt.h"
@@ -42,7 +42,7 @@ static CRITICAL_SECTION initLock;
*/
static CRITICAL_SECTION allocLock;
-static Tcl_Mutex allocLockPtr = (Tcl_Mutex) &allocLock;
+static Tcl_Mutex allocLockPtr = (Tcl_Mutex) &allocLock;
/*
* Condition variables are implemented with a combination of a
@@ -203,17 +203,17 @@ Tcl_GetCurrentThread()
void
TclpInitLock()
{
- if (!init) {
- /*
- * There is a fundamental race here that is solved by creating
- * the first Tcl interpreter in a single threaded environment.
- * Once the interpreter has been created, it is safe to create
- * more threads that create interpreters in parallel.
- */
- init = 1;
- InitializeCriticalSection(&initLock);
- InitializeCriticalSection(&masterLock);
- }
+ if (!init) {
+ /*
+ * There is a fundamental race here that is solved by creating
+ * the first Tcl interpreter in a single threaded environment.
+ * Once the interpreter has been created, it is safe to create
+ * more threads that create interpreters in parallel.
+ */
+ init = 1;
+ InitializeCriticalSection(&initLock);
+ InitializeCriticalSection(&masterLock);
+ }
EnterCriticalSection(&initLock);
}
@@ -302,8 +302,8 @@ TclpMasterLock()
Tcl_Mutex *
Tcl_GetAllocMutex()
{
-#ifdef TCL_THREADS
- InitializeCriticalSection(&allocLock);
+#ifdef TCL_THREADS
+ InitializeCriticalSection(&allocLock);
return &allocLockPtr;
#else
return NULL;