Skip to content

Commit 59528ad

Browse files
committed
fix patch:#10715
1 parent 97893c0 commit 59528ad

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/scheduler_up.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,12 +203,14 @@ void rt_schedule(void)
203203
rt_base_t level;
204204
struct rt_thread *to_thread;
205205
struct rt_thread *from_thread;
206-
/* using local variable to avoid unecessary function call */
207-
struct rt_thread *curr_thread = rt_thread_self();
206+
struct rt_thread *curr_thread;
208207

209208
/* disable interrupt */
210209
level = rt_hw_interrupt_disable();
211210

211+
/* using local variable to avoid unnecessary function call */
212+
curr_thread = rt_thread_self();
213+
212214
/* check the scheduler is enabled or not */
213215
if (rt_scheduler_lock_nest == 0)
214216
{

0 commit comments

Comments
 (0)