sched/sched: Updata out-of-data comment about SMP CPU affinity issue

THOR-208

As before commit 070ad15f14 and 1621fcb09e
Fix issue about CPU affinity, But these two comments don't
update comment. Github version updated that. So sync it.

Signed-off-by: chenhonglin <chenhonglin@xiaomi.com>
Change-Id: Ie5abf10893e66334d3dd9939bd85f2a40741a2c5
This commit is contained in:
chenhonglin
2021-09-29 14:23:27 +08:00
parent 8c2a40f864
commit 1b6104200a
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -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.
*/
+2 -2
View File
@@ -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);