diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-06-18 10:33:33 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-06-18 10:33:33 (GMT) |
commit | 099345d98c26c7c3b683fb4739fab70524532ed1 (patch) | |
tree | 0f532d64719a02f7ff26e2a40402a73e6e78c731 /generic/tclEvent.c | |
parent | 7243b34d8035e8705d690339b6005161c9edbd8d (diff) | |
download | tcl-099345d98c26c7c3b683fb4739fab70524532ed1.zip tcl-099345d98c26c7c3b683fb4739fab70524532ed1.tar.gz tcl-099345d98c26c7c3b683fb4739fab70524532ed1.tar.bz2 |
Fix [3611974]: InitSubsystems multiple thread issue
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(); } |