assert: Stop scheduling when an assert is invoked to prevent running task change
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
This commit is contained in:
parent
9b6e5f22f9
commit
ef48dec9f9
@ -559,6 +559,8 @@ void _assert(FAR const char *filename, int linenum,
|
||||
|
||||
flags = enter_critical_section();
|
||||
|
||||
sched_lock();
|
||||
|
||||
/* try to save current context if regs is null */
|
||||
|
||||
if (regs == NULL)
|
||||
@ -680,5 +682,7 @@ void _assert(FAR const char *filename, int linenum,
|
||||
#endif
|
||||
}
|
||||
|
||||
sched_unlock();
|
||||
|
||||
leave_critical_section(flags);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user