jlaitine commented on code in PR #16673:
URL: https://github.com/apache/nuttx/pull/16673#discussion_r2230652368


##########
sched/sched/sched_process_delivered.c:
##########
@@ -78,67 +72,31 @@ void nxsched_process_delivered(int cpu)
       g_cpu_irqset |= (1 << cpu);
     }
 
-  tcb = current_task(cpu);
-
-  if (g_delivertasks[cpu] == NULL)
-    {
-      if (tcb->irqcount <= 0)
-        {
-          cpu_irqlock_clear();
-        }
-
-      return;
-    }
-
-  if (nxsched_islocked_tcb(tcb))
+  if (!nxsched_switch_running(cpu))

Review Comment:
   I'll just add a parameter to nxsched_switch_running, to tell whether to 
compare >= or > "bool switch_equal", and set that in roundrobin. The code still 
needs to traverse the list in case affinity is restricted, so it is just 
easier/cleaner to be inside the nxsced_switch_running...



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to