mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-11-16 12:34:33 +00:00
fix patch:#10715
This commit is contained in:
@@ -203,12 +203,14 @@ void rt_schedule(void)
|
|||||||
rt_base_t level;
|
rt_base_t level;
|
||||||
struct rt_thread *to_thread;
|
struct rt_thread *to_thread;
|
||||||
struct rt_thread *from_thread;
|
struct rt_thread *from_thread;
|
||||||
/* using local variable to avoid unecessary function call */
|
struct rt_thread *curr_thread;
|
||||||
struct rt_thread *curr_thread = rt_thread_self();
|
|
||||||
|
|
||||||
/* disable interrupt */
|
/* disable interrupt */
|
||||||
level = rt_hw_interrupt_disable();
|
level = rt_hw_interrupt_disable();
|
||||||
|
|
||||||
|
/* using local variable to avoid unnecessary function call */
|
||||||
|
curr_thread = rt_thread_self();
|
||||||
|
|
||||||
/* check the scheduler is enabled or not */
|
/* check the scheduler is enabled or not */
|
||||||
if (rt_scheduler_lock_nest == 0)
|
if (rt_scheduler_lock_nest == 0)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user