diff options
author | Benjamin Walsh <benjamin.walsh@windriver.com> | 2016-10-24 12:57:46 -0400 |
---|---|---|
committer | Benjamin Walsh <benjamin.walsh@windriver.com> | 2016-10-26 20:42:11 +0000 |
commit | c9dd56ec711a89a1e895cf704fa8de1597ef19ff (patch) | |
tree | 136dc91233c003f283a4d7173b1c46dbf8674fdc /kernel | |
parent | 378fa6598fac1500efad384f2fcb5d0c377ce634 (diff) |
unified: add kconfig option for idle thread stack size
Idle thread may need a bigger stack depending on extra work it has to
do, like power management or kernel event logging.
Change-Id: Iff691d7838036d602bad79799820b68ad55ad00f
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/unified/Kconfig | 10 | ||||
-rw-r--r-- | kernel/unified/init.c | 2 |
2 files changed, 11 insertions, 1 deletions
diff --git a/kernel/unified/Kconfig b/kernel/unified/Kconfig index ff803fab6..80a3dc694 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 a825d8f23..7425b839c 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" |