mirror of
https://github.com/apache/nuttx.git
synced 2025-12-08 02:32:54 +08:00
sched/irq: add stack size judgment when detecting stack overflow
`up_check_intstack` exists only when CONFIG_ARCH_INTERRUPTSTACK is greater than 0, so the irq should first determine whether CONFIG_ARCH_INTERRUPTSTACK is greater than 0 to determine whether up_check_intstack can be called. Signed-off-by: guoshengyuan1 <guoshengyuan1@xiaomi.com>
This commit is contained in:
committed by
Xiang Xiao
parent
10fd309452
commit
5874f46a5b
@@ -158,7 +158,8 @@ void irq_dispatch(int irq, FAR void *context)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_STACKCHECK_MARGIN) && (CONFIG_STACKCHECK_MARGIN > 0)
|
||||
#if defined(CONFIG_STACKCHECK_MARGIN) && (CONFIG_STACKCHECK_MARGIN > 0) && \
|
||||
defined(CONFIG_ARCH_INTERRUPTSTACK) && (CONFIG_ARCH_INTERRUPTSTACK > 0)
|
||||
DEBUGASSERT(up_check_intstack(this_cpu(),
|
||||
CONFIG_STACKCHECK_MARGIN) == 0);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user