From: Toni Wilen Date: Sat, 25 Aug 2018 19:29:22 +0000 (+0300) Subject: Fix compilation without WITH_THREADED_CPU X-Git-Tag: 4100~101 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=fcf96daf34037734d3abe86f7ffd2d5502932d6b;p=francis%2Fwinuae.git Fix compilation without WITH_THREADED_CPU --- diff --git a/newcpu.cpp b/newcpu.cpp index 3066344c..0b2a998d 100644 --- a/newcpu.cpp +++ b/newcpu.cpp @@ -5197,17 +5197,6 @@ static uae_thread_id cpu_thread_tid; static bool m68k_cs_initialized; -void custom_reset_cpu(bool hardreset, bool keyboardreset) -{ - if (cpu_thread_tid != uae_thread_get_id()) { - custom_reset(hardreset, keyboardreset); - return; - } - cpu_thread_reset = 1 | (hardreset ? 2 : 0) | (keyboardreset ? 4 : 0); - uae_sem_post(&cpu_wakeup_sema); - uae_sem_wait(&cpu_in_sema); -} - static int do_specialties_thread(void) { if (regs.spcflags & SPCFLAG_MODE_CHANGE) @@ -5458,6 +5447,21 @@ static void run_cpu_thread(void *(*f)(void *)) #endif +void custom_reset_cpu(bool hardreset, bool keyboardreset) +{ +#ifdef WITH_THREADED_CPU + if (cpu_thread_tid != uae_thread_get_id()) { + custom_reset(hardreset, keyboardreset); + return; + } + cpu_thread_reset = 1 | (hardreset ? 2 : 0) | (keyboardreset ? 4 : 0); + uae_sem_post(&cpu_wakeup_sema); + uae_sem_wait(&cpu_in_sema); +#else + custom_reset(hardreset, keyboardreset); +#endif +} + #ifdef JIT /* Completely different run_2 replacement */ void do_nothing (void)