sched: add STACK_USAGE_SAFE_PERCENT for stack overflow check

Change-Id: Ia70e243b36401e28c31fcd7e1b480b79374c27ef
Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
ligd
2021-06-18 16:55:46 +08:00
committed by Xiang Xiao
parent 940c80f7b3
commit 8d2615f78d
2 changed files with 15 additions and 2 deletions
+12
View File
@@ -1758,6 +1758,18 @@ config STACK_COLORATION
Only supported by a few architectures.
config STACK_USAGE_SAFE_PERCENT
int "Stack usage safe precent"
default 0
range 0 100
depends on STACK_COLORATION
---help---
Stack usage precent = up_check_tcbstack() * 100 / tcb->adj_stack_size,
this should lower then STACK_USAGE_SAFE_PERCENT.
Idle thread will timely check stack usage when this marco value > 0.
N.B. This feature should not be used in production code.
config STACK_CANARIES
bool "Compiler stack canaries"
depends on ARCH_HAVE_STACKCHECK