summaryrefslogtreecommitdiffstats
path: root/generic/tclEvent.c
diff options
context:
space:
mode:
authorjan.nijtmans <jan.nijtmans@noemail.net>2013-06-18 10:36:06 (GMT)
committerjan.nijtmans <jan.nijtmans@noemail.net>2013-06-18 10:36:06 (GMT)
commit8397e591a988db81b9a4e268d7f9b9456c178932 (patch)
tree5fb2affdbb29cd1e3c3ed61e06d9eada6cff394f /generic/tclEvent.c
parentd228ab0cb053b97508cc64a87bb5abae01cf6781 (diff)
parentae6267eb33729e6c242ea17eb37ebe61f12ac25c (diff)
downloadtcl-8397e591a988db81b9a4e268d7f9b9456c178932.zip
tcl-8397e591a988db81b9a4e268d7f9b9456c178932.tar.gz
tcl-8397e591a988db81b9a4e268d7f9b9456c178932.tar.bz2
Fix [3611974]: InitSubsystems multiple thread issue
FossilOrigin-Name: 33d17a1685ac36bf8bc8c4d5fce95ab99d073720
Diffstat (limited to 'generic/tclEvent.c')
-rw-r--r--generic/tclEvent.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/generic/tclEvent.c b/generic/tclEvent.c
index c8ba1e6..686b80d 100644
--- a/generic/tclEvent.c
+++ b/generic/tclEvent.c
@@ -1030,14 +1030,8 @@ TclInitSubsystems(void)
TclpInitLock();
if (subsystemsInitialized == 0) {
- /*
- * Have to set this bit here to avoid deadlock with the routines
- * below us that call into TclInitSubsystems.
- */
-
- subsystemsInitialized = 1;
- /*
+ /*
* Initialize locks used by the memory allocators before anything
* interesting happens so we can use the allocators in the
* implementation of self-initializing locks.
@@ -1061,6 +1055,7 @@ TclInitSubsystems(void)
TclInitEncodingSubsystem(); /* Process wide encoding init. */
TclpSetInterfaces();
TclInitNamespaceSubsystem();/* Register ns obj type (mutexed). */
+ subsystemsInitialized = 1;
}
TclpInitUnlock();
}