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:
parent
c18f6e8d6d
commit
6d54632319
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user