diff --git a/apps/debug_menu.c b/apps/debug_menu.c index cfa15c2998..60f405ae50 100644 --- a/apps/debug_menu.c +++ b/apps/debug_menu.c @@ -157,12 +157,12 @@ bool dbg_os(void) case ACTION_SETTINGS_DEC: currval--; if(currval < 0) - currval = num_threads[CPU]-1; + currval = cores[CPU].num_threads-1; break; case ACTION_SETTINGS_INC: currval++; - if(currval > num_threads[CPU]-1) + if(currval > cores[CPU].num_threads-1) currval = 0; break; } diff --git a/firmware/export/thread.h b/firmware/export/thread.h index 16408e816e..e102997dae 100644 --- a/firmware/export/thread.h +++ b/firmware/export/thread.h @@ -29,6 +29,7 @@ #define DEFAULT_STACK_SIZE 0x400 /* Bytes */ +#ifndef SIMULATOR /* Need to keep structures inside the header file because debug_menu * needs them. */ #ifdef CPU_COLDFIRE @@ -78,6 +79,7 @@ struct core_entry { int current_thread; struct thread_entry threads[MAXTHREADS]; }; +#endif int create_thread(void (*function)(void), void* stack, int stack_size, const char *name);