summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvasiljevic <zv@archiware.com>2004-07-19 19:19:07 (GMT)
committervasiljevic <zv@archiware.com>2004-07-19 19:19:07 (GMT)
commitafaa17239f992c094f9d5c07a7ada3c58e205993 (patch)
treee7872072641dc6ed2d875b24c878706ce55af282
parent4af5f58b2ad4e68a5391a885c1b34c6ea128f926 (diff)
downloadtcl-afaa17239f992c094f9d5c07a7ada3c58e205993.zip
tcl-afaa17239f992c094f9d5c07a7ada3c58e205993.tar.gz
tcl-afaa17239f992c094f9d5c07a7ada3c58e205993.tar.bz2
Redefined MASTER_LOCK in win/tclWinThrd.c to call TclpMasterLock for the
sake of Tcl API users never creating Tcl interpreters.
-rw-r--r--ChangeLog5
-rw-r--r--win/tclWinThrd.c10
2 files changed, 11 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 2c109ba..c1bdac8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2004-07-19 Zoran Vasiljevic <vasiljevic@users.sf.net>
+
+ * win/tclwinThrd.c: redefined MASTER_LOCK to call
+ TclpMasterLock. Fixes Bug #987967
+
2004-07-17 Vince Darley <vincentdarley@users.sourceforge.net>
* generic/tclIOUtil.c: fix to rare 'cd' infinite loop in
diff --git a/win/tclWinThrd.c b/win/tclWinThrd.c
index 1194fcc..c968a53 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.31 2004/06/22 13:09:01 vasiljevic Exp $
+ * RCS: @(#) $Id: tclWinThrd.c,v 1.32 2004/07/19 19:19:07 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,6 +428,7 @@ TclFinalizeLock ()
{
MASTER_LOCK;
DeleteCriticalSection(&joinLock);
+ /* Destroy the critical section that we are holding! */
DeleteCriticalSection(&masterLock);
init = 0;
#ifdef TCL_THREADS
@@ -435,7 +437,7 @@ TclFinalizeLock ()
allocOnce = 0;
}
#endif
- /* Destroy the critical section that we are holding. */
+ /* Destroy the critical section that we are holding! */
DeleteCriticalSection(&initLock);
}