summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
Diffstat (limited to 'generic')
-rw-r--r--generic/tclBasic.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index 10d8311..8de3a0d 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclBasic.c,v 1.20 1999/05/13 01:50:32 stanton Exp $
+ * RCS: @(#) $Id: tclBasic.c,v 1.21 1999/05/14 23:16:54 surles Exp $
*/
#include "tclInt.h"
@@ -529,6 +529,19 @@ Tcl_CreateInterp()
TclPrecTraceProc, (ClientData) NULL);
TclpSetVariables(interp);
+#ifdef TCL_THREADS
+ /*
+ * The existence of the "threaded" element of the tcl_platform array indicates
+ * that this particular Tcl shell has been compiled with threads turned on.
+ * Using "info exists tcl_platform(threaded)" a Tcl script can introspect on the
+ * interpreter level of thread safety.
+ */
+
+
+ Tcl_SetVar2(interp, "tcl_platform", "threaded", "1",
+ TCL_GLOBAL_ONLY);
+#endif
+
/*
* Register Tcl's version number.
*/