diff --git a/kernel/init.c b/kernel/init.c index f7d05e18110..232a9480386 100644 --- a/kernel/init.c +++ b/kernel/init.c @@ -43,6 +43,9 @@ uint32_t __noinit z_timestamp_main; /* timestamp when main task starts */ uint32_t __noinit z_timestamp_idle; /* timestamp when CPU goes idle */ #endif +/* the only struct z_kernel instance */ +struct z_kernel _kernel; + /* init/main and idle threads */ K_THREAD_STACK_DEFINE(z_main_stack, CONFIG_MAIN_STACK_SIZE); struct k_thread z_main_thread; diff --git a/kernel/sched.c b/kernel/sched.c index 372ddc6ac34..edbabdad175 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -46,9 +46,6 @@ LOG_MODULE_DECLARE(os, CONFIG_KERNEL_LOG_LEVEL); #define _priq_wait_best z_priq_dumb_best #endif -/* the only struct z_kernel instance */ -struct z_kernel _kernel; - struct k_spinlock sched_spinlock; static void update_cache(int);