diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | win/tclWinThrd.c | 6 |
2 files changed, 11 insertions, 1 deletions
@@ -1,5 +1,11 @@ 2008-10-13 Pat Thoyts <patthoyts@users.sourceforge.net> + * win/tclWinThrd.c (TclpThreadCreate): We need to initialize the + thread id variable to 0 as on 64 bit windows this is a pointer + sized field while windows only fills it with a 32 bit value. The + result is an inability to join the threads as the ids cannot be + matched. + * generic/tclTest.c (TestNRELevels): set array to the right size 2008-10-13 Donal K. Fellows <dkf@users.sf.net> diff --git a/win/tclWinThrd.c b/win/tclWinThrd.c index 9667d7d..62a538b 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.48 2008/07/24 21:54:43 nijtmans Exp $ + * RCS: @(#) $Id: tclWinThrd.c,v 1.49 2008/10/13 22:51:31 patthoyts Exp $ */ #include "tclWinInt.h" @@ -155,6 +155,10 @@ TclpThreadCreate( EnterCriticalSection(&joinLock); + *idPtr = 0; /* must initialize as Tcl_Thread is a pointer and + * on WIN64 sizeof void* != sizeof unsigned + */ + #if defined(_MSC_VER) || defined(__MSVCRT__) || defined(__BORLANDC__) tHandle = (HANDLE) _beginthreadex(NULL, (unsigned) stackSize, proc, clientData, 0, (unsigned *)idPtr); |