summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2013-06-18 10:36:06 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2013-06-18 10:36:06 (GMT)
commit38dc2ca052671f7992d7ad2b33bec6813b128dca (patch)
tree5fb2affdbb29cd1e3c3ed61e06d9eada6cff394f
parentf498e25fe3bf5f45bf480cc450fa0f9e83910d64 (diff)
parentc605707c6bdc1d617272e87d0d7cb15b11a5d41c (diff)
downloadtcl-38dc2ca052671f7992d7ad2b33bec6813b128dca.zip
tcl-38dc2ca052671f7992d7ad2b33bec6813b128dca.tar.gz
tcl-38dc2ca052671f7992d7ad2b33bec6813b128dca.tar.bz2
Fix [3611974]: InitSubsystems multiple thread issue
-rw-r--r--ChangeLog4
-rw-r--r--generic/tclEvent.c9
2 files changed, 6 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index f98af14..691db2d 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 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();
}