summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2013-06-18 10:33:33 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2013-06-18 10:33:33 (GMT)
commitc605707c6bdc1d617272e87d0d7cb15b11a5d41c (patch)
tree0f532d64719a02f7ff26e2a40402a73e6e78c731 /generic
parent914227b03938ff6da7a4b35ef2e9a2b495df3ba0 (diff)
downloadtcl-c605707c6bdc1d617272e87d0d7cb15b11a5d41c.zip
tcl-c605707c6bdc1d617272e87d0d7cb15b11a5d41c.tar.gz
tcl-c605707c6bdc1d617272e87d0d7cb15b11a5d41c.tar.bz2
Fix [3611974]: InitSubsystems multiple thread issue
Diffstat (limited to 'generic')
-rw-r--r--generic/tclEvent.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/generic/tclEvent.c b/generic/tclEvent.c
index 7daa7bb..d98685a 100644
--- a/generic/tclEvent.c
+++ b/generic/tclEvent.c
@@ -949,14 +949,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.
@@ -974,12 +968,13 @@ TclInitSubsystems(void)
TclpInitPlatform(); /* Creates signal handler(s) */
TclInitDoubleConversion(); /* Initializes constants for
* converting to/from double. */
- TclInitObjSubsystem(); /* Register obj types, create
+ TclInitObjSubsystem(); /* Register obj types, create
* mutexes. */
TclInitIOSubsystem(); /* Inits a tsd key (noop). */
TclInitEncodingSubsystem(); /* Process wide encoding init. */
TclpSetInterfaces();
- TclInitNamespaceSubsystem();/* Register ns obj type (mutexed). */
+ TclInitNamespaceSubsystem();/* Register ns obj type (mutexed). */
+ subsystemsInitialized = 1;
}
TclpInitUnlock();
}