diff --git a/src/misc.c b/src/misc.c index ec02750a..41a7a98a 100644 --- a/src/misc.c +++ b/src/misc.c @@ -624,7 +624,7 @@ void c_initialize_firsttime() } #if !defined(TESTING) && !defined(__APPLE__) -extern void cpu_thread(void *dummyptr); +extern void *cpu_thread(void *dummyptr); int main(int _argc, char **_argv) { argc = _argc; @@ -634,7 +634,7 @@ int main(int _argc, char **_argv) { c_initialize_firsttime(); /* init svga graphics and vm */ // spin off cpu thread - pthread_create(&cpu_thread_id, NULL, (void *) &cpu_thread, (void *)NULL); + pthread_create(&cpu_thread_id, NULL, (void *) &cpu_thread,(void *)NULL); c_keys_set_key(kF8); // show credits diff --git a/src/timing.c b/src/timing.c index 081e5510..34327281 100644 --- a/src/timing.c +++ b/src/timing.c @@ -159,7 +159,7 @@ void timing_initialize() _timing_initialize(cpu_scale_factor); } -void cpu_thread(void *dummyptr) { +void *cpu_thread(void *dummyptr) { assert(pthread_self() == cpu_thread_id); @@ -325,6 +325,8 @@ void cpu_thread(void *dummyptr) { reinitialize(); } while (1); + + return NULL; } // From AppleWin... diff --git a/src/timing.h b/src/timing.h index 80df0e1a..ca298cab 100644 --- a/src/timing.h +++ b/src/timing.h @@ -56,7 +56,7 @@ void timing_toggle_cpu_speed(); void timing_initialize(); -void cpu_thread(); +void *cpu_thread(void *ignored); void CpuCalcCycles(const unsigned long nExecutedCycles);