We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 97893c0 commit 59528adCopy full SHA for 59528ad
1 file changed
src/scheduler_up.c
@@ -203,12 +203,14 @@ void rt_schedule(void)
203
rt_base_t level;
204
struct rt_thread *to_thread;
205
struct rt_thread *from_thread;
206
- /* using local variable to avoid unecessary function call */
207
- struct rt_thread *curr_thread = rt_thread_self();
+ struct rt_thread *curr_thread;
208
209
/* disable interrupt */
210
level = rt_hw_interrupt_disable();
211
+ /* using local variable to avoid unnecessary function call */
212
+ curr_thread = rt_thread_self();
213
+
214
/* check the scheduler is enabled or not */
215
if (rt_scheduler_lock_nest == 0)
216
{
0 commit comments