summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--generic/tclThread.c4
-rw-r--r--win/tclWinThrd.c59
3 files changed, 30 insertions, 39 deletions
diff --git a/ChangeLog b/ChangeLog
index 08d0ede..08cb8ec 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2002-12-09 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * win/tclWinThrd.c (TclpMasterUnlock):
+ * generic/tclThread.c (TclFinalizeThreadData): TclpMasterUnlock
+ must exist and be called unconditional of TCL_THREADS. [Bug #651139]
+
2002-12-08 David Gravereaux <davygrvy@pobox.com>
* win/tclWinSock.c (SocketThreadExitHandler, InitSockets): Check
diff --git a/generic/tclThread.c b/generic/tclThread.c
index 0f6e2e8..5ddbb91 100644
--- a/generic/tclThread.c
+++ b/generic/tclThread.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: tclThread.c,v 1.5 2000/04/05 00:42:20 welch Exp $
+ * RCS: @(#) $Id: tclThread.c,v 1.6 2002/12/10 00:34:15 hobbs Exp $
*/
#include "tclInt.h"
@@ -417,9 +417,7 @@ TclFinalizeThreadData()
}
#endif
}
-#ifdef TCL_THREADS
TclpMasterUnlock();
-#endif
}
/*
diff --git a/win/tclWinThrd.c b/win/tclWinThrd.c
index 2f1d60e..80b6be0 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.22 2002/11/26 22:35:21 davygrvy Exp $
+ * RCS: @(#) $Id: tclWinThrd.c,v 1.23 2002/12/10 00:34:15 hobbs Exp $
*/
#include "tclWinInt.h"
@@ -218,7 +218,6 @@ TclpThreadExit(status)
ExitThread((DWORD) status);
#endif
}
-
/*
*----------------------------------------------------------------------
@@ -241,7 +240,6 @@ Tcl_GetCurrentThread()
{
return (Tcl_ThreadId)GetCurrentThreadId();
}
-
/*
*----------------------------------------------------------------------
@@ -279,7 +277,6 @@ TclpInitLock()
}
EnterCriticalSection(&initLock);
}
-
/*
*----------------------------------------------------------------------
@@ -303,7 +300,6 @@ TclpInitUnlock()
{
LeaveCriticalSection(&initLock);
}
-
/*
*----------------------------------------------------------------------
@@ -342,7 +338,29 @@ TclpMasterLock()
}
EnterCriticalSection(&masterLock);
}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * TclpMasterUnlock
+ *
+ * This procedure is used to release a lock that serializes creation
+ * and deletion of synchronization objects.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * Release the master mutex.
+ *
+ *----------------------------------------------------------------------
+ */
+void
+TclpMasterUnlock()
+{
+ LeaveCriticalSection(&masterLock);
+}
/*
*----------------------------------------------------------------------
@@ -385,29 +403,6 @@ Tcl_GetAllocMutex()
/* locally used prototype */
static void FinalizeConditionEvent(ClientData data);
-/*
- *----------------------------------------------------------------------
- *
- * TclpMasterUnlock
- *
- * This procedure is used to release a lock that serializes creation
- * and deletion of synchronization objects.
- *
- * Results:
- * None.
- *
- * Side effects:
- * Release the master mutex.
- *
- *----------------------------------------------------------------------
- */
-
-void
-TclpMasterUnlock()
-{
- LeaveCriticalSection(&masterLock);
-}
-
/*
*----------------------------------------------------------------------
@@ -451,7 +446,6 @@ Tcl_MutexLock(mutexPtr)
csPtr = *((CRITICAL_SECTION **)mutexPtr);
EnterCriticalSection(csPtr);
}
-
/*
*----------------------------------------------------------------------
@@ -476,7 +470,6 @@ Tcl_MutexUnlock(mutexPtr)
CRITICAL_SECTION *csPtr = *((CRITICAL_SECTION **)mutexPtr);
LeaveCriticalSection(csPtr);
}
-
/*
*----------------------------------------------------------------------
@@ -506,7 +499,6 @@ TclpFinalizeMutex(mutexPtr)
*mutexPtr = NULL;
}
}
-
/*
*----------------------------------------------------------------------
@@ -549,7 +541,6 @@ TclpThreadDataKeyInit(keyPtr)
}
MASTER_UNLOCK;
}
-
/*
*----------------------------------------------------------------------
@@ -580,7 +571,6 @@ TclpThreadDataKeyGet(keyPtr)
return (VOID *) TlsGetValue(*indexPtr);
}
}
-
/*
*----------------------------------------------------------------------
@@ -608,7 +598,6 @@ TclpThreadDataKeySet(keyPtr, data)
DWORD *indexPtr = *(DWORD **)keyPtr;
TlsSetValue(*indexPtr, (void *)data);
}
-
/*
*----------------------------------------------------------------------
@@ -856,7 +845,6 @@ Tcl_ConditionWait(condPtr, mutexPtr, timePtr)
LeaveCriticalSection(&winCondPtr->condLock);
EnterCriticalSection(csPtr);
}
-
/*
*----------------------------------------------------------------------
@@ -911,7 +899,6 @@ Tcl_ConditionNotify(condPtr)
*/
}
}
-
/*
*----------------------------------------------------------------------