diff options
author | surles <surles> | 1999-05-17 18:11:00 (GMT) |
---|---|---|
committer | surles <surles> | 1999-05-17 18:11:00 (GMT) |
commit | 066b2c80e6380b10ea526000113ea80d5945d62e (patch) | |
tree | ef2dc467fa4db9e29591ca92cf255960cc6f24c0 | |
parent | e5757fd88b9d30b0d4f1b5528cfbaf7390847425 (diff) | |
download | tcl-066b2c80e6380b10ea526000113ea80d5945d62e.zip tcl-066b2c80e6380b10ea526000113ea80d5945d62e.tar.gz tcl-066b2c80e6380b10ea526000113ea80d5945d62e.tar.bz2 |
merged thread intorspection into branch from mainline
-rw-r--r-- | generic/tclBasic.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 1ef52ed..90bce70 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.19.2.1 1999/05/14 18:26:10 stanton Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.19.2.2 1999/05/17 18:11:00 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. */ |