summaryrefslogtreecommitdiffstats
path: root/generic/tclThread.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclThread.c')
-rw-r--r--generic/tclThread.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/generic/tclThread.c b/generic/tclThread.c
index 04d03d5..79f5199 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.16.2.1 2007/07/01 17:31:25 dgp Exp $
+ * RCS: @(#) $Id: tclThread.c,v 1.16.2.2 2007/10/27 04:11:47 dgp Exp $
*/
#include "tclInt.h"
@@ -142,6 +142,8 @@ TclThreadDataKeyGet(
* Keep a list of (mutexes/condition variable/data key) used during
* finalization.
*
+ * Assume master lock is held.
+ *
* Results:
* None.
*
@@ -201,6 +203,7 @@ RememberSyncObject(
* ForgetSyncObject
*
* Remove a single object from the list.
+ * Assume master lock is held.
*
* Results:
* None.
@@ -232,6 +235,7 @@ ForgetSyncObject(
* TclRememberMutex
*
* Keep a list of mutexes used during finalization.
+ * Assume master lock is held.
*
* Results:
* None.
@@ -273,7 +277,9 @@ Tcl_MutexFinalize(
#ifdef TCL_THREADS
TclpFinalizeMutex(mutexPtr);
#endif
+ TclpMasterLock();
ForgetSyncObject((char *) mutexPtr, &mutexRecord);
+ TclpMasterUnlock();
}
/*
@@ -282,6 +288,7 @@ Tcl_MutexFinalize(
* TclRememberCondition
*
* Keep a list of condition variables used during finalization.
+ * Assume master lock is held.
*
* Results:
* None.
@@ -323,7 +330,9 @@ Tcl_ConditionFinalize(
#ifdef TCL_THREADS
TclpFinalizeCondition(condPtr);
#endif
+ TclpMasterLock();
ForgetSyncObject((char *) condPtr, &condRecord);
+ TclpMasterUnlock();
}
/*