summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
author半吊子内核开发 <[email protected]>2023-05-17 07:36:24 +0800
committerGitHub <[email protected]>2023-05-17 07:36:24 +0800
commit442330cc54a62b9a739253342f6c3233a938983c (patch)
treeb5fcf8de083a45f9b96d2941753da2b8ccdce7a3 /src
parent5f8b33f85dfb17630a1639491dc6cfcf1ee24bab (diff)
[kernel][src] improve code (#7367)
Diffstat (limited to 'src')
-rw-r--r--src/thread.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/thread.c b/src/thread.c
index aef098963c..133289738e 100644
--- a/src/thread.c
+++ b/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;
}