From 8c89eda3cecbbeefdac39bbaf98c2230a64bebd2 Mon Sep 17 00:00:00 2001 From: georgeps Date: Wed, 16 Jul 2008 23:31:29 +0000 Subject: * win/tclWinThrd.c: Test for TLS_OUT_OF_INDEXES to make certain that thread key creation is successful. --- ChangeLog | 5 +++++ win/tclWinThrd.c | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index e9d76f3..f8fad22 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-07-16 George Peter Staplin + + * win/tclWinThrd.c: Test for TLS_OUT_OF_INDEXES to make certain that + thread key creation is successful. + 2008-07-16 Donal K. Fellows * generic/tclOO.c, generic/tclOOInt.h, generic/tclOOBasic.c: 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; } -- cgit v0.12