places on Windows: fix OS thread identification

The bug particularly broke `#:async-apply` handling for an FFI callback,
causing the current thread always to be equated with the target thread.
For example, the teachpack documentation (which now renders images
to SVG) kept crashing on a multi-place build due to callbacks getting
invoked in the wrong place.
This commit is contained in:
Matthew Flatt 2014-04-05 06:50:57 -06:00
parent c18f6e8d6d
commit 6d54632319
2 changed files with 2 additions and 2 deletions

View File

@ -187,7 +187,7 @@ DWORD WINAPI mzrt_win_thread_stub(void *data)
mzrt_thread_id mz_proc_thread_self() {
#ifdef WIN32
return GetCurrentThread();
return GetCurrentThreadId();
#else
return pthread_self();
#endif

View File

@ -21,7 +21,7 @@ void mzrt_set_user_break_handler(void (*user_break_handler)(int));
#if (defined(__WIN32__) || defined(WIN32) || defined(_WIN32))
# include <winsock2.h>
typedef HANDLE mzrt_thread_id;
typedef DWORD mzrt_thread_id;
#else
#include <pthread.h>
typedef pthread_t mzrt_thread_id;