Skip to content

Commit 442330c

Browse files
authored
[kernel][src] improve code (#7367)
1 parent 5f8b33f commit 442330c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/thread.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -588,8 +588,8 @@ rt_err_t rt_thread_yield(void)
588588
level = rt_hw_interrupt_disable();
589589
thread->remaining_tick = thread->init_tick;
590590
thread->stat |= RT_THREAD_STAT_YIELD;
591-
rt_schedule();
592591
rt_hw_interrupt_enable(level);
592+
rt_schedule();
593593

594594
return RT_EOK;
595595
}

0 commit comments

Comments
 (0)