mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-09-21 10:36:04 +08:00
修正在多核时,运行在另外核上的idle任务有可能会插在rt_thread_exit调用rt_schedule之前释放其资源的问题
This commit is contained in:
+3
-3
@@ -107,11 +107,11 @@ void rt_thread_exit(void)
|
||||
rt_list_insert_after(&rt_thread_defunct, &(thread->tlist));
|
||||
}
|
||||
|
||||
/* enable interrupt */
|
||||
rt_hw_interrupt_enable(level);
|
||||
|
||||
/* switch to next task */
|
||||
rt_schedule();
|
||||
|
||||
/* enable interrupt */
|
||||
rt_hw_interrupt_enable(level);
|
||||
}
|
||||
|
||||
static rt_err_t _rt_thread_init(struct rt_thread *thread,
|
||||
|
||||
Reference in New Issue
Block a user