kernel: stack_sentinel: disable in single-threaded builds
Add a dependency on MULTITHREADING for the STACK_SENTINEL feature, so it may not get enabled in single-thread Zephyr builds. Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit is contained in:
parent
b9253b5c19
commit
dd574f6ec7
2 changed files with 3 additions and 2 deletions
|
@ -328,6 +328,7 @@ static inline int z_vrfy_k_thread_name_copy(k_tid_t thread,
|
|||
#endif /* CONFIG_USERSPACE */
|
||||
|
||||
|
||||
#ifdef CONFIG_MULTITHREADING
|
||||
#ifdef CONFIG_STACK_SENTINEL
|
||||
/* Check that the stack sentinel is still present
|
||||
*
|
||||
|
@ -359,9 +360,8 @@ void z_check_stack_sentinel(void)
|
|||
z_except_reason(K_ERR_STACK_CHK_FAIL);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif /* CONFIG_STACK_SENTINEL */
|
||||
|
||||
#ifdef CONFIG_MULTITHREADING
|
||||
void z_impl_k_thread_start(struct k_thread *thread)
|
||||
{
|
||||
SYS_PORT_TRACING_OBJ_FUNC(k_thread, start, thread);
|
||||
|
|
|
@ -139,6 +139,7 @@ config STACK_USAGE
|
|||
config STACK_SENTINEL
|
||||
bool "Enable stack sentinel"
|
||||
select THREAD_STACK_INFO
|
||||
depends on MULTITHREADING
|
||||
depends on !USERSPACE
|
||||
help
|
||||
Store a magic value at the lowest addresses of a thread's stack.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue