diff --git a/kernel/unified/Kconfig b/kernel/unified/Kconfig index ff803fab6d3..80a3dc694fb 100644 --- a/kernel/unified/Kconfig +++ b/kernel/unified/Kconfig @@ -114,6 +114,16 @@ config MAIN_STACK_SIZE After initialization is complete, the thread runs main(). +config IDLE_STACK_SIZE + int + prompt "Size of stack for idle thread" + default 256 + help + Depending on the work that the idle task must do, most likely due to + power management but possibly to other features like system event + logging (e.g. logging when the system goes to sleep), the idle thread + may need more stack space than the default value. + config ISR_STACK_SIZE int prompt "ISR and initialization stack size (in bytes)" diff --git a/kernel/unified/init.c b/kernel/unified/init.c index a825d8f2374..7425b839c45 100644 --- a/kernel/unified/init.c +++ b/kernel/unified/init.c @@ -72,7 +72,7 @@ uint64_t __noinit __idle_tsc; /* timestamp when CPU goes idle */ /* init/main and idle threads */ -#define IDLE_STACK_SIZE 256 +#define IDLE_STACK_SIZE CONFIG_IDLE_STACK_SIZE #if CONFIG_MAIN_STACK_SIZE & (STACK_ALIGN - 1) #error "MAIN_STACK_SIZE must be a multiple of the stack alignment"