diff options
author | jan.nijtmans <jan.nijtmans@noemail.net> | 2013-06-18 10:33:33 (GMT) |
---|---|---|
committer | jan.nijtmans <jan.nijtmans@noemail.net> | 2013-06-18 10:33:33 (GMT) |
commit | ae6267eb33729e6c242ea17eb37ebe61f12ac25c (patch) | |
tree | 0f532d64719a02f7ff26e2a40402a73e6e78c731 /generic/tclEvent.c | |
parent | 7569e3bc56ac4c6533358361dd939481c43e3951 (diff) | |
download | tcl-ae6267eb33729e6c242ea17eb37ebe61f12ac25c.zip tcl-ae6267eb33729e6c242ea17eb37ebe61f12ac25c.tar.gz tcl-ae6267eb33729e6c242ea17eb37ebe61f12ac25c.tar.bz2 |
Fix [3611974]: InitSubsystems multiple thread issue
FossilOrigin-Name: d155ff70cfd0300ceccb252708110273838bcb2a
Diffstat (limited to 'generic/tclEvent.c')
-rw-r--r-- | generic/tclEvent.c | 13 |
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(); } |