🐞 fix(cpu): cpus_lock should lock scheduler (#8368)

This commit is contained in:
xqyjlj
2023-12-30 15:47:42 +08:00
committed by GitHub
parent e045d30bac
commit 84706ba7b4
+2 -1
View File
@@ -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);