diff --git a/sched/sched/sched_removereadytorun.c b/sched/sched/sched_removereadytorun.c index f1a84a9fd6d..398a348ce98 100644 --- a/sched/sched/sched_removereadytorun.c +++ b/sched/sched/sched_removereadytorun.c @@ -209,8 +209,8 @@ bool nxsched_remove_readytorun(FAR struct tcb_s *rtcb) if (rtrtcb != NULL && rtrtcb->sched_priority >= nxttcb->sched_priority) { - /* The TCB at the head of the ready to run list has the higher - * priority. Remove that task from the head of the g_readytorun + /* The TCB rtrtcb has the higher priority and it can be run on + * target CPU. Remove that task (rtrtcb) from the g_readytorun * list and add to the head of the g_assignedtasks[cpu] list. */ diff --git a/sched/sched/sched_setpriority.c b/sched/sched/sched_setpriority.c index a8a1b6d3605..e07cbadafc0 100644 --- a/sched/sched/sched_setpriority.c +++ b/sched/sched/sched_setpriority.c @@ -62,7 +62,7 @@ static FAR struct tcb_s *nxsched_nexttcb(FAR struct tcb_s *tcb) /* Which task should run next? It will be either the next tcb in the * assigned task list (nxttcb) or a TCB in the g_readytorun list. We can * only select a task from that list if the affinity mask includes the - * current CPU. + * tcb->cpu. * * If pre-emption is locked or another CPU is in a critical section, * then use the 'nxttcb' which will probably be the IDLE thread. @@ -70,7 +70,7 @@ static FAR struct tcb_s *nxsched_nexttcb(FAR struct tcb_s *tcb) if (!nxsched_islocked_global() && !irq_cpu_locked(this_cpu())) { - /* Search for the highest priority task that can run on this CPU. */ + /* Search for the highest priority task that can run on tcb->cpu. */ for (rtrtcb = (FAR struct tcb_s *)g_readytorun.head; rtrtcb != NULL && !CPU_ISSET(tcb->cpu, &rtrtcb->affinity);