diff options
author | vasiljevic <vasiljevic@noemail.net> | 2004-07-19 19:23:02 (GMT) |
---|---|---|
committer | vasiljevic <vasiljevic@noemail.net> | 2004-07-19 19:23:02 (GMT) |
commit | fe08b7fe093083c419b91d7ea9b3722b9ff387f5 (patch) | |
tree | a3a134598c9acd3e0761b5c99b3f979dbc17b839 /win | |
parent | 87f068b28d109fb532a3a990e4e05af72af22b0a (diff) | |
download | tcl-fe08b7fe093083c419b91d7ea9b3722b9ff387f5.zip tcl-fe08b7fe093083c419b91d7ea9b3722b9ff387f5.tar.gz tcl-fe08b7fe093083c419b91d7ea9b3722b9ff387f5.tar.bz2 |
Redefined MASTER_LOCK to call TclpMasterLock for the sake of Tcl API
users never creating interpreters.
FossilOrigin-Name: 3990dbc1b1d360813356f0003085ffd0e3d89740
Diffstat (limited to 'win')
-rw-r--r-- | win/tclWinThrd.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/win/tclWinThrd.c b/win/tclWinThrd.c index f7fe507..4f0caac 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.6 2004/06/22 11:55:36 vasiljevic Exp $ + * RCS: @(#) $Id: tclWinThrd.c,v 1.24.2.7 2004/07/19 19:23:03 vasiljevic Exp $ */ #include "tclWinInt.h" @@ -25,8 +25,9 @@ static CRITICAL_SECTION masterLock; static int init = 0; -#define MASTER_LOCK EnterCriticalSection(&masterLock) -#define MASTER_UNLOCK LeaveCriticalSection(&masterLock) +#define MASTER_LOCK TclpMasterLock() +#define MASTER_UNLOCK TclpMasterUnlock() + /* * This is the master lock used to serialize initialization and finalization @@ -427,13 +428,14 @@ TclFinalizeLock () { MASTER_LOCK; DeleteCriticalSection(&joinLock); + /* Destroy the critical section that we are holding! */ DeleteCriticalSection(&masterLock); init = 0; #ifdef TCL_THREADS DeleteCriticalSection(&allocLock); allocOnce = 0; #endif - /* Destroy the critical section that we are holding. */ + /* Destroy the critical section that we are holding! */ DeleteCriticalSection(&initLock); } |