Skip to content

Commit 8dd2a07

Browse files
author
shaojinchun
committed
去除scheduler.c的_get_highest_priority_thread函数中重复判断
1 parent 8d59983 commit 8dd2a07

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

src/scheduler.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -130,16 +130,7 @@ static struct rt_thread* _get_highest_priority_thread(rt_ubase_t *highest_prio)
130130
struct rt_cpu* pcpu = rt_cpu_self();
131131
#if RT_THREAD_PRIORITY_MAX > 32
132132
register rt_ubase_t number;
133-
#endif
134133

135-
if (rt_thread_ready_priority_group == 0 && pcpu->priority_group == 0)
136-
{
137-
*highest_prio = pcpu->current_thread->current_priority;
138-
/* only local IDLE is readly */
139-
return pcpu->current_thread;
140-
}
141-
142-
#if RT_THREAD_PRIORITY_MAX > 32
143134
number = __rt_ffs(rt_thread_ready_priority_group) - 1;
144135
highest_ready_priority = (number << 3) + __rt_ffs(rt_thread_ready_table[number]) - 1;
145136
number = __rt_ffs(pcpu->priority_group) - 1;

0 commit comments

Comments
 (0)