diff options
author | vasiljevic <zv@archiware.com> | 2005-05-30 07:56:12 (GMT) |
---|---|---|
committer | vasiljevic <zv@archiware.com> | 2005-05-30 07:56:12 (GMT) |
commit | 8dc74b796137b2e13ee8aa3ac6c1b811d49fd4dc (patch) | |
tree | fffc5afda6431bc42e5428fe70f31a0be4069521 /win | |
parent | 226baeea03144cecb753db8d1aa9e016d28fac06 (diff) | |
download | tcl-8dc74b796137b2e13ee8aa3ac6c1b811d49fd4dc.zip tcl-8dc74b796137b2e13ee8aa3ac6c1b811d49fd4dc.tar.gz tcl-8dc74b796137b2e13ee8aa3ac6c1b811d49fd4dc.tar.bz2 |
Fixed Tcl Bug #1204064.
Diffstat (limited to 'win')
-rw-r--r-- | win/tclWinThrd.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/win/tclWinThrd.c b/win/tclWinThrd.c index 2b71f62..cb9c958 100644 --- a/win/tclWinThrd.c +++ b/win/tclWinThrd.c @@ -9,7 +9,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.37 2005/05/10 18:35:42 kennykb Exp $ + * RCS: @(#) $Id: tclWinThrd.c,v 1.38 2005/05/30 07:56:12 vasiljevic Exp $ */ #include "tclWinInt.h" @@ -117,7 +117,7 @@ typedef struct WinCondition { */ #ifdef USE_THREAD_ALLOC static int once; -static DWORD key; +static DWORD tlsKey; typedef struct allocMutex { Tcl_Mutex tlock; @@ -700,7 +700,7 @@ TclpFinalizeThreadData(keyPtr) result = (VOID *)TlsGetValue(*indexPtr); if (result != NULL) { #if defined(USE_THREAD_ALLOC) && !defined(TCL_MEM_DEBUG) - if (indexPtr == &key) { + if (indexPtr == &tlsKey) { TclpFreeAllocCache(result); return; } @@ -1092,14 +1092,14 @@ TclpGetAllocCache(void) * on each thread that calls this, but only on threads that * call this. */ - key = TlsAlloc(); + tlsKey = TlsAlloc(); once = 1; - if (key == TLS_OUT_OF_INDEXES) { + if (tlsKey == TLS_OUT_OF_INDEXES) { Tcl_Panic("could not allocate thread local storage"); } } - result = TlsGetValue(key); + result = TlsGetValue(tlsKey); if ((result == NULL) && (GetLastError() != NO_ERROR)) { Tcl_Panic("TlsGetValue failed from TclpGetAllocCache!"); } @@ -1110,7 +1110,7 @@ void TclpSetAllocCache(void *ptr) { BOOL success; - success = TlsSetValue(key, ptr); + success = TlsSetValue(tlsKey, ptr); if (!success) { Tcl_Panic("TlsSetValue failed from TclpSetAllocCache!"); } @@ -1127,7 +1127,7 @@ TclpFreeAllocCache(void *ptr) * and destroys the tsd key which stores allocator caches. */ TclFreeAllocCache(ptr); - success = TlsSetValue(key, NULL); + success = TlsSetValue(tlsKey, NULL); if (!success) { panic("TlsSetValue failed from TclpFreeAllocCache!"); } @@ -1136,7 +1136,7 @@ TclpFreeAllocCache(void *ptr) * Called by us in TclFinalizeThreadAlloc() during * the library finalization initiated from Tcl_Finalize() */ - success = TlsFree(key); + success = TlsFree(tlsKey); if (!success) { Tcl_Panic("TlsFree failed from TclpFreeAllocCache!"); } |