mirror of
https://github.com/apache/nuttx.git
synced 2026-05-28 03:45:50 +08:00
assert: thread assert don't interrupt by IRQ
Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
@@ -555,6 +555,9 @@ void _assert(FAR const char *filename, int linenum,
|
|||||||
FAR struct tcb_s *rtcb = running_task();
|
FAR struct tcb_s *rtcb = running_task();
|
||||||
struct utsname name;
|
struct utsname name;
|
||||||
bool fatal = true;
|
bool fatal = true;
|
||||||
|
int flags;
|
||||||
|
|
||||||
|
flags = enter_critical_section();
|
||||||
|
|
||||||
/* try to save current context if regs is null */
|
/* try to save current context if regs is null */
|
||||||
|
|
||||||
@@ -676,4 +679,6 @@ void _assert(FAR const char *filename, int linenum,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
leave_critical_section(flags);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user