sched/irq: add a check for the interrupt stack in irq_dispatch

After irq_dispatch finished, the interrupt stack will be checked to
determine whether overflow occurs.
The relevant configuration reuses the configuration of stack overflow
detection during context switching.

Signed-off-by: guoshengyuan1 <guoshengyuan1@xiaomi.com>
This commit is contained in:
guoshengyuan1
2025-09-29 11:02:00 +08:00
committed by Xiang Xiao
parent a0ffe03ec5
commit ca7608c2ac
13 changed files with 78 additions and 32 deletions
+5
View File
@@ -157,4 +157,9 @@ void irq_dispatch(int irq, FAR void *context)
kmm_checkcorruption();
}
#endif
#if defined(CONFIG_STACKCHECK_SOFTWARE) && CONFIG_STACKCHECK_MARGIN > 0
DEBUGASSERT(up_check_intstack(this_cpu(),
CONFIG_STACKCHECK_MARGIN) == 0);
#endif
}