diff options
Diffstat (limited to 'win/tclWinThrd.c')
-rw-r--r-- | win/tclWinThrd.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/win/tclWinThrd.c b/win/tclWinThrd.c index e12be89..e449731 100644 --- a/win/tclWinThrd.c +++ b/win/tclWinThrd.c @@ -120,11 +120,11 @@ TclpThreadCreate(idPtr, proc, clientData) Tcl_ThreadCreateProc proc; /* Main() function of the thread */ ClientData clientData; /* The one argument to Main() */ { - HANDLE tHandle; + unsigned long code; - tHandle = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE) proc, - (DWORD *)clientData, 0, (DWORD *)idPtr); - if (tHandle == NULL) { + code = _beginthreadex(NULL, 0, (LPTHREAD_START_ROUTINE) proc, + (void *)clientData, 0, (unsigned *)idPtr); + if (code == 0) { return TCL_ERROR; } else { return TCL_OK; @@ -151,7 +151,7 @@ void TclpThreadExit(status) int status; { - ExitThread((DWORD)status); + _endthreadex((DWORD)status); } |