Explorar o código

[kernel][src] improve code (#7367)

半吊子内核开发 %!s(int64=2) %!d(string=hai) anos
pai
achega
442330cc54
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/thread.c

+ 1 - 1
src/thread.c

@@ -588,8 +588,8 @@ rt_err_t rt_thread_yield(void)
     level = rt_hw_interrupt_disable();
     thread->remaining_tick = thread->init_tick;
     thread->stat |= RT_THREAD_STAT_YIELD;
-    rt_schedule();
     rt_hw_interrupt_enable(level);
+    rt_schedule();
 
     return RT_EOK;
 }