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 9732a4f..bf623ba 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.17 2007/06/30 09:59:00 vasiljevic Exp $
+ * RCS: @(#) $Id: tclThread.c,v 1.18 2007/10/25 18:40:28 vasiljevic 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();
}
/*