mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-03-01 06:15:27 +08:00
[kernel][src] improve code (#7367)
This commit is contained in:
parent
5f8b33f85d
commit
442330cc54
@ -588,8 +588,8 @@ rt_err_t rt_thread_yield(void)
|
|||||||
level = rt_hw_interrupt_disable();
|
level = rt_hw_interrupt_disable();
|
||||||
thread->remaining_tick = thread->init_tick;
|
thread->remaining_tick = thread->init_tick;
|
||||||
thread->stat |= RT_THREAD_STAT_YIELD;
|
thread->stat |= RT_THREAD_STAT_YIELD;
|
||||||
rt_schedule();
|
|
||||||
rt_hw_interrupt_enable(level);
|
rt_hw_interrupt_enable(level);
|
||||||
|
rt_schedule();
|
||||||
|
|
||||||
return RT_EOK;
|
return RT_EOK;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user