kernel: Move _kernel from sched to init
_kernel struct can be used when multithreading is disabled. In that case sched.c may not be compiled. Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
This commit is contained in:
parent
b8fb353cd4
commit
7dcff6ecfe
2 changed files with 3 additions and 3 deletions
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue