提交 0366eb13 编写于 作者: B Bernard Xiong

[Kernel] Fix the critical issue when scheduler not start

上级 d517389e
......@@ -884,14 +884,17 @@ void rt_exit_critical(void)
level = rt_hw_interrupt_disable();
rt_scheduler_lock_nest --;
if (rt_scheduler_lock_nest <= 0)
{
rt_scheduler_lock_nest = 0;
/* enable interrupt */
rt_hw_interrupt_enable(level);
rt_schedule();
if (rt_current_thread)
{
/* if scheduler is started, do a schedule */
rt_schedule();
}
}
else
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册