File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -281,6 +281,8 @@ rt_inline void _rt_sched_remove_thread(struct rt_thread *thread)
281281void rt_schedule (void )
282282{
283283 rt_base_t level ;
284+ /* need_insert_from_thread: need to insert from_thread to ready queue */
285+ rt_bool_t need_insert_from_thread ;
284286 /* using local variable to avoid unecessary function call */
285287 struct rt_thread * curr_thread ;
286288 struct rt_thread * to_thread ;
@@ -291,9 +293,8 @@ void rt_schedule(void)
291293 /* check the scheduler is enabled or not */
292294 if (rt_scheduler_lock_nest == 0 && rt_thread_ready_priority_group )
293295 {
294- /* need_insert_from_thread: need to insert from_thread to ready queue */
295- rt_bool_t need_insert_from_thread = RT_FALSE ;
296296
297+ need_insert_from_thread = RT_FALSE ;
297298 curr_thread = rt_thread_self ();
298299
299300 if ((RT_SCHED_CTX (curr_thread ).stat & RT_THREAD_STAT_MASK ) == RT_THREAD_RUNNING )
You can’t perform that action at this time.
0 commit comments