assert: thread assert don't interrupt by IRQ
Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
parent
b10d6be17a
commit
9b6e5f22f9
1 changed files with 5 additions and 0 deletions
|
@ -555,6 +555,9 @@ void _assert(FAR const char *filename, int linenum,
|
|||
FAR struct tcb_s *rtcb = running_task();
|
||||
struct utsname name;
|
||||
bool fatal = true;
|
||||
int flags;
|
||||
|
||||
flags = enter_critical_section();
|
||||
|
||||
/* try to save current context if regs is null */
|
||||
|
||||
|
@ -676,4 +679,6 @@ void _assert(FAR const char *filename, int linenum,
|
|||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
leave_critical_section(flags);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue