From 8dd2a07d45852698c313997bc0dd8f5d699ac6dc Mon Sep 17 00:00:00 2001 From: shaojinchun Date: Sat, 11 May 2019 13:50:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E9=99=A4scheduler.c=E7=9A=84=5Fget=5F?= =?UTF-8?q?highest=5Fpriority=5Fthread=E5=87=BD=E6=95=B0=E4=B8=AD=E9=87=8D?= =?UTF-8?q?=E5=A4=8D=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/scheduler.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/scheduler.c b/src/scheduler.c index 458d1e15c0..b487bd4b60 100644 --- a/src/scheduler.c +++ b/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; -- GitLab