mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 00:14:22 +08:00
sched/sched: Updata out-of-data comment about SMP CPU affinity issue
THOR-208 As before commit070ad15f14and1621fcb09eFix 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:
@@ -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.
|
||||
*/
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user