mm: do kmm_checkcorruption in IRQ when TCB_FLAG_DEBUG_CHECK set

Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
ligd
2021-04-25 22:57:55 +08:00
committed by Xiang Xiao
parent fa90a3dfd4
commit b5d1ec28de
2 changed files with 11 additions and 1 deletions
+9
View File
@@ -27,6 +27,7 @@
#include <debug.h>
#include <nuttx/arch.h>
#include <nuttx/irq.h>
#include <nuttx/mm/mm.h>
#include <nuttx/random.h>
#include <nuttx/sched_note.h>
@@ -184,6 +185,14 @@ void irq_dispatch(int irq, FAR void *context)
sched_note_irqhandler(irq, vector, false);
#endif
#ifdef CONFIG_DEBUG_MM
if ((g_running_tasks[this_cpu()]->flags & TCB_FLAG_MEM_CHECK) || \
(this_task()->flags & TCB_FLAG_MEM_CHECK))
{
kmm_checkcorruption();
}
#endif
/* Record the new "running" task. g_running_tasks[] is only used by
* assertion logic for reporting crashes.
*/