summaryrefslogtreecommitdiffstats
path: root/win/tclWinThrd.c
diff options
context:
space:
mode:
authorgeorgeps <georgeps>2008-07-16 23:31:29 (GMT)
committergeorgeps <georgeps>2008-07-16 23:31:29 (GMT)
commit8c89eda3cecbbeefdac39bbaf98c2230a64bebd2 (patch)
tree14b8d3bdede282cc3a35212b14b41efb92955244 /win/tclWinThrd.c
parent50c3ec45e663031133f8f9024976f0d5501a3f46 (diff)
downloadtcl-8c89eda3cecbbeefdac39bbaf98c2230a64bebd2.zip
tcl-8c89eda3cecbbeefdac39bbaf98c2230a64bebd2.tar.gz
tcl-8c89eda3cecbbeefdac39bbaf98c2230a64bebd2.tar.bz2
* win/tclWinThrd.c: Test for TLS_OUT_OF_INDEXES to make certain that
thread key creation is successful.
Diffstat (limited to 'win/tclWinThrd.c')
-rw-r--r--win/tclWinThrd.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/win/tclWinThrd.c b/win/tclWinThrd.c
index 6ee0a5e..d9dd0f7 100644
--- a/win/tclWinThrd.c
+++ b/win/tclWinThrd.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclWinThrd.c,v 1.46 2008/06/13 05:45:15 mistachkin Exp $
+ * RCS: @(#) $Id: tclWinThrd.c,v 1.47 2008/07/16 23:31:29 georgeps Exp $
*/
#include "tclWinInt.h"
@@ -969,6 +969,10 @@ void *TclpThreadCreateKey (void) {
}
*key = TlsAlloc();
+
+ if (*key == TLS_OUT_OF_INDEXES) {
+ Tcl_Panic("unable to allocate thread-local storage");
+ }
return key;
}