52 |
|
#include "kernel_windows.h" |
53 |
|
|
54 |
|
#if USE_JIT |
55 |
< |
extern void flush_icache_range(uint32 start, uint32 size); // from compemu_support.cpp |
55 |
> |
extern void flush_icache_range(uint8 *start, uint32 size); // from compemu_support.cpp |
56 |
|
#endif |
57 |
|
|
58 |
|
#ifdef ENABLE_MON |
77 |
|
|
78 |
|
|
79 |
|
// Global variables |
80 |
< |
static uint8 last_xpram[XPRAM_SIZE]; // Buffer for monitoring XPRAM changes |
80 |
> |
HANDLE emul_thread = NULL; // Handle of MacOS emulation thread (main thread) |
81 |
|
|
82 |
+ |
static uint8 last_xpram[XPRAM_SIZE]; // Buffer for monitoring XPRAM changes |
83 |
|
static bool xpram_thread_active = false; // Flag: XPRAM watchdog installed |
84 |
|
static volatile bool xpram_thread_cancel = false; // Flag: Cancel XPRAM thread |
85 |
|
static SDL_Thread *xpram_thread = NULL; // XPRAM watchdog |
422 |
|
QuitEmulator(); |
423 |
|
D(bug("Initialization complete\n")); |
424 |
|
|
425 |
+ |
// Get handle of main thread |
426 |
+ |
emul_thread = GetCurrentThread(); |
427 |
+ |
|
428 |
|
// SDL threads available, start 60Hz thread |
429 |
|
tick_thread_active = ((tick_thread = SDL_CreateThread(tick_func, NULL)) != NULL); |
430 |
|
if (!tick_thread_active) { |
517 |
|
{ |
518 |
|
#if USE_JIT |
519 |
|
if (UseJIT) |
520 |
< |
flush_icache_range((uintptr)start, size); |
520 |
> |
flush_icache_range((uint8 *)start, size); |
521 |
|
#endif |
522 |
|
} |
523 |
|
|