sched: Improve nxsched stack overflow checking implementation

1. Remove STACKCHECK_SOFTWARE config,
   2. Do sp value checking when STACKCHECK_MARGIN == 0,
   3. Do margin-based stack check when STACKCHECK_MARGIN > 0,
   4. Disable stack check when STACKCHECK_MARGIN == -1

Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
This commit is contained in:
wangchengdong
2025-10-01 21:46:38 +08:00
committed by Xiang Xiao
parent 1210dc4919
commit 07a470f696
8 changed files with 119 additions and 30 deletions
+1 -1
View File
@@ -158,7 +158,7 @@ void irq_dispatch(int irq, FAR void *context)
}
#endif
#if defined(CONFIG_STACKCHECK_SOFTWARE) && CONFIG_STACKCHECK_MARGIN > 0
#if defined(CONFIG_STACKCHECK_MARGIN) && (CONFIG_STACKCHECK_MARGIN > 0)
DEBUGASSERT(up_check_intstack(this_cpu(),
CONFIG_STACKCHECK_MARGIN) == 0);
#endif