mm: do kmm_checkcorruption in IRQ when TCB_FLAG_DEBUG_CHECK set
Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
parent
fa90a3dfd4
commit
b5d1ec28de
@ -108,7 +108,8 @@
|
|||||||
#define TCB_FLAG_SYSCALL (1 << 10) /* Bit 9: In a system call */
|
#define TCB_FLAG_SYSCALL (1 << 10) /* Bit 9: In a system call */
|
||||||
#define TCB_FLAG_EXIT_PROCESSING (1 << 11) /* Bit 10: Exitting */
|
#define TCB_FLAG_EXIT_PROCESSING (1 << 11) /* Bit 10: Exitting */
|
||||||
#define TCB_FLAG_FREE_STACK (1 << 12) /* Bit 12: Free stack after exit */
|
#define TCB_FLAG_FREE_STACK (1 << 12) /* Bit 12: Free stack after exit */
|
||||||
/* Bits 13-15: Available */
|
#define TCB_FLAG_MEM_CHECK (1 << 13) /* Bit 13: Memory check */
|
||||||
|
/* Bits 14-15: Available */
|
||||||
|
|
||||||
/* Values for struct task_group tg_flags */
|
/* Values for struct task_group tg_flags */
|
||||||
|
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
#include <nuttx/arch.h>
|
#include <nuttx/arch.h>
|
||||||
#include <nuttx/irq.h>
|
#include <nuttx/irq.h>
|
||||||
|
#include <nuttx/mm/mm.h>
|
||||||
#include <nuttx/random.h>
|
#include <nuttx/random.h>
|
||||||
#include <nuttx/sched_note.h>
|
#include <nuttx/sched_note.h>
|
||||||
|
|
||||||
@ -184,6 +185,14 @@ void irq_dispatch(int irq, FAR void *context)
|
|||||||
sched_note_irqhandler(irq, vector, false);
|
sched_note_irqhandler(irq, vector, false);
|
||||||
#endif
|
#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
|
/* Record the new "running" task. g_running_tasks[] is only used by
|
||||||
* assertion logic for reporting crashes.
|
* assertion logic for reporting crashes.
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user