assert:add a last type to call notifier
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
This commit is contained in:
parent
1486600d7d
commit
9a32cf7a1a
@ -38,6 +38,7 @@ enum panic_type_e
|
|||||||
{
|
{
|
||||||
PANIC_KERNEL = 0,
|
PANIC_KERNEL = 0,
|
||||||
PANIC_TASK = 1,
|
PANIC_TASK = 1,
|
||||||
|
PANIC_KERNEL_FINAL = 2,
|
||||||
};
|
};
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
@ -455,7 +455,7 @@ void _assert(FAR const char *filename, int linenum)
|
|||||||
fatal = true;
|
fatal = true;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
panic_notifier_call_chain(fatal ? PANIC_KERNEL : PANIC_TASK, NULL);
|
panic_notifier_call_chain(fatal ? PANIC_KERNEL : PANIC_TASK, rtcb);
|
||||||
|
|
||||||
#ifdef CONFIG_SMP
|
#ifdef CONFIG_SMP
|
||||||
# if CONFIG_TASK_NAME_SIZE > 0
|
# if CONFIG_TASK_NAME_SIZE > 0
|
||||||
@ -518,6 +518,7 @@ void _assert(FAR const char *filename, int linenum)
|
|||||||
/* Flush any buffered SYSLOG data */
|
/* Flush any buffered SYSLOG data */
|
||||||
|
|
||||||
syslog_flush();
|
syslog_flush();
|
||||||
|
panic_notifier_call_chain(PANIC_KERNEL_FINAL, rtcb);
|
||||||
|
|
||||||
reboot_notifier_call_chain(SYS_HALT, NULL);
|
reboot_notifier_call_chain(SYS_HALT, NULL);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user