From 93f7cd2d53321f30b69402d13ea908826e8e9b13 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Mon, 6 Nov 2017 13:33:46 -0600 Subject: [PATCH] sched/sched/sched_cpuselect.c: For SMP, In order to find the cpu with the lowest priority thread, we have to remember the already found lowest priority. Noted by Anonymous in Issue #75 --- sched/sched/sched_cpuselect.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sched/sched/sched_cpuselect.c b/sched/sched/sched_cpuselect.c index efd5c8417ba..c995cb87644 100644 --- a/sched/sched/sched_cpuselect.c +++ b/sched/sched/sched_cpuselect.c @@ -113,6 +113,7 @@ int sched_cpu_select(cpu_set_t affinity) else if (rtcb->sched_priority < minprio) { DEBUGASSERT(rtcb->sched_priority > 0); + minprio = rtcb->sched_priority; cpu = i; } }