浏览代码

去除scheduler.c的_get_highest_priority_thread函数中重复判断

shaojinchun 6 年之前
父节点
当前提交
8dd2a07d45
共有 1 个文件被更改,包括 0 次插入9 次删除
  1. 0 9
      src/scheduler.c

+ 0 - 9
src/scheduler.c

@@ -130,16 +130,7 @@ static struct rt_thread* _get_highest_priority_thread(rt_ubase_t *highest_prio)
     struct rt_cpu* pcpu = rt_cpu_self();
 #if RT_THREAD_PRIORITY_MAX > 32
     register rt_ubase_t number;
-#endif
 
-    if (rt_thread_ready_priority_group == 0 && pcpu->priority_group == 0)
-    {
-        *highest_prio = pcpu->current_thread->current_priority;
-        /* only local IDLE is readly */
-        return pcpu->current_thread;
-    }
-
-#if RT_THREAD_PRIORITY_MAX > 32
     number = __rt_ffs(rt_thread_ready_priority_group) - 1;
     highest_ready_priority = (number << 3) + __rt_ffs(rt_thread_ready_table[number]) - 1;
     number = __rt_ffs(pcpu->priority_group) - 1;