diff options
author | hobbs <hobbs> | 2002-12-10 00:34:14 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2002-12-10 00:34:14 (GMT) |
commit | 2946cae4563a26a948d74ef19280df5da4b3ee9f (patch) | |
tree | 264f69b9e86e9b900a58d20d8b25027d4b8227e5 | |
parent | 9c6a6a68cfa0c1a9f7f1e029607ea8a8926d81eb (diff) | |
download | tcl-2946cae4563a26a948d74ef19280df5da4b3ee9f.zip tcl-2946cae4563a26a948d74ef19280df5da4b3ee9f.tar.gz tcl-2946cae4563a26a948d74ef19280df5da4b3ee9f.tar.bz2 |
* win/tclWinThrd.c (TclpMasterUnlock):
* generic/tclThread.c (TclFinalizeThreadData): TclpMasterUnlock
must exist and be called unconditional of TCL_THREADS. [Bug #651139]
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | generic/tclThread.c | 4 | ||||
-rw-r--r-- | win/tclWinThrd.c | 59 |
3 files changed, 30 insertions, 39 deletions
@@ -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) */ } } - /* *---------------------------------------------------------------------- |