diff options
| author | xqyjlj <[email protected]> | 2023-12-30 15:47:42 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-12-30 15:47:42 +0800 |
| commit | 84706ba7b4224e0104f11d09d47227c67444f5dc (patch) | |
| tree | 37393d20d3e2771d49fc48e36b156f6aacfdabe1 /src | |
| parent | e045d30bac67d23b1baef1a34f3fc2a56893f58a (diff) | |
🐞 fix(cpu): cpus_lock should lock scheduler (#8368)
Diffstat (limited to 'src')
| -rw-r--r-- | src/cpu.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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); |
