diff options
author | davygrvy <davygrvy@pobox.com> | 2004-04-23 07:17:39 (GMT) |
---|---|---|
committer | davygrvy <davygrvy@pobox.com> | 2004-04-23 07:17:39 (GMT) |
commit | e4357f99416ff3c38085702ce9524e7d0cca56e1 (patch) | |
tree | fe2059de7e4735fb23f35b0429a1cab941328257 /win/tclWinThrd.c | |
parent | 5b91da692e931bb424e837c60a0841b1d38b5dac (diff) | |
download | tcl-e4357f99416ff3c38085702ce9524e7d0cca56e1.zip tcl-e4357f99416ff3c38085702ce9524e7d0cca56e1.tar.gz tcl-e4357f99416ff3c38085702ce9524e7d0cca56e1.tar.bz2 |
revert back to 1.24.2.2 from prior mistaken commit.
Diffstat (limited to 'win/tclWinThrd.c')
-rw-r--r-- | win/tclWinThrd.c | 39 |
1 files changed, 5 insertions, 34 deletions
diff --git a/win/tclWinThrd.c b/win/tclWinThrd.c index 8d738b3..e09d327 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.24.2.3 2004/04/23 07:11:26 davygrvy Exp $ + * RCS: @(#) $Id: tclWinThrd.c,v 1.24.2.4 2004/04/23 07:17:39 davygrvy Exp $ */ #include "tclWinInt.h" @@ -25,7 +25,6 @@ static CRITICAL_SECTION masterLock; static int init = 0; -static int allocOnce = 0; #define MASTER_LOCK EnterCriticalSection(&masterLock) #define MASTER_UNLOCK LeaveCriticalSection(&masterLock) @@ -394,46 +393,18 @@ Tcl_Mutex * Tcl_GetAllocMutex() { #ifdef TCL_THREADS - if (!allocOnce) { + static int once = 0; + + if (!once) { InitializeCriticalSection(&allocLock); - allocOnce = 1; + once = 1; } return &allocLockPtr; #else return NULL; #endif } - -/* - *---------------------------------------------------------------------- - * - * TclpFinalizeLock - * - * This procedure is used to destroy all private resources used in - * this file. - * - * Results: - * None. - * - * Side effects: - * Destroys everything private. TclpInitLock must be held - * entering this function. - * - *---------------------------------------------------------------------- - */ -void -TclFinalizeLock () -{ - MASTER_LOCK; - DeleteCriticalSection(&joinLock); - DeleteCriticalSection(&masterLock); - init = 0; - DeleteCriticalSection(&allocLock); - allocOnce = 0; - /* Destroy the critical section that we are holding. */ - DeleteCriticalSection(&initLock); -} #ifdef TCL_THREADS |