From 231cf7db484ad07f61e3b46d485f676ca3c68931 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Wed, 20 Apr 2011 11:25:15 -0600 Subject: [PATCH] win32: create threads in the right way for C library --- src/racket/src/mzrt.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/racket/src/mzrt.c b/src/racket/src/mzrt.c index 1565a8e4ab..9962b7269b 100644 --- a/src/racket/src/mzrt.c +++ b/src/racket/src/mzrt.c @@ -23,6 +23,7 @@ START_XFORM_SUSPEND; /* platform headers */ #ifdef WIN32 # include +# include #else # include # include @@ -235,7 +236,7 @@ mz_proc_thread* mz_proc_thread_create_w_stacksize(mz_proc_thread_start start_pro stub_data->data = data; stub_data->thread = thread; # ifdef WIN32 - thread->threadid = CreateThread(NULL, stacksize, mzrt_win_thread_stub, stub_data, 0, NULL); + thread->threadid = (HANDLE)_beginthreadex(NULL, stacksize, mzrt_win_thread_stub, stub_data, 0, NULL); # else # ifdef MZ_PRECISE_GC pthread_create(&thread->threadid, attr, mzrt_thread_stub, stub_data); @@ -301,7 +302,7 @@ int mz_proc_thread_detach(mz_proc_thread *thread) { void mz_proc_thread_exit(void *rc) { #ifdef WIN32 - ExitThread((DWORD)rc); + _endthreadex((unsigned)rc); #else # ifndef MZ_PRECISE_GC pthread_exit(rc);