summaryrefslogtreecommitdiffstats
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
parent914227b03938ff6da7a4b35ef2e9a2b495df3ba0 (diff)
downloadtcl-c605707c6bdc1d617272e87d0d7cb15b11a5d41c.zip
tcl-c605707c6bdc1d617272e87d0d7cb15b11a5d41c.tar.gz
tcl-c605707c6bdc1d617272e87d0d7cb15b11a5d41c.tar.bz2
Fix [3611974]: InitSubsystems multiple thread issue
-rw-r--r--ChangeLog4
-rw-r--r--generic/tclEvent.c13
2 files changed, 8 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index 54c3b99..247dca4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2013-06-18 Jan Nijtmans <nijtmans@users.sf.net>
+
+ * generic/tclEvent.c: Bug [3611974]: InitSubsystems multiple thread issue.
+
2013-06-17 Jan Nijtmans <nijtmans@users.sf.net>
* generic/regc_locale.c: Bug [a876646efe]: re_expr character class
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();
}