🐞 fix(cpu): cpus_lock should lock scheduler (#8368)
This commit is contained in:
parent
e045d30bac
commit
84706ba7b4
|
@ -162,7 +162,7 @@ rt_base_t rt_cpus_lock(void)
|
|||
struct rt_cpu* pcpu;
|
||||
|
||||
level = rt_hw_local_irq_disable();
|
||||
|
||||
rt_enter_critical();
|
||||
pcpu = rt_cpu_self();
|
||||
if (pcpu->current_thread != RT_NULL)
|
||||
{
|
||||
|
@ -207,6 +207,7 @@ void rt_cpus_unlock(rt_base_t level)
|
|||
}
|
||||
}
|
||||
rt_hw_local_irq_enable(level);
|
||||
rt_exit_critical();
|
||||
}
|
||||
RTM_EXPORT(rt_cpus_unlock);
|
||||
|
||||
|
|
Loading…
Reference in New Issue