Skip to content

Commit 90dff70

Browse files
committed
更新
1 parent 200f748 commit 90dff70

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/scheduler_up.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,8 @@ rt_inline void _rt_sched_remove_thread(struct rt_thread *thread)
281281
void 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)

0 commit comments

Comments
 (0)