rq->curr==p not equivalent to task_running(rq,p)
PATCH 1/1 rq->curr==p not equivalent to task_running(rq,p)
task_running(rq,p) is equivalent to (rq->curr == p) only for some architectures. Boot tested on i386.
Regards,
Joe
kernel/sched.c renamed from kernel/sched.c.0 +1 -1
@@ -2062,7 +2062,7 @@* our priority decreased, or if we are not currently running on * this runqueue and our priority is higher than the current's */ -if (rq->curr == p) { +if (task_running (rq, p)) {if (p->prio > oldprio)resched_task (rq->curr); }else if (p->prio < rq->curr->prio)
Quoted 2 lines · Joe Korty
task_running(rq,p)is equivalent to (rq->curr== p) only for some architectures. Boot tested on i386.
Oh, good catch.
Andrew, mind taking this?
Thanks, Joe.
Robert Love
kernel/sched.c renamed from kernel/sched.c.0 +1 -1
@@ -2062,7 +2062,7 @@* our priority decreased, or if we are not currently running on * this runqueue and our priority is higher than the current's */ -if (rq->curr == p) { +if (task_running (rq, p)) {if (p->prio > oldprio)resched_task (rq->curr); }else if (p->prio < rq->curr->prio)
kernel/sched.c line 2065
Quoted 5 lines · Joe Korty
task_running(rq,p)is equivalent to (rq->curr== p) only for some architectures. Boot tested on i386.kernel/sched.c renamed from kernel/sched.c.0 +1
-1-if (rq->curr == p) { +if (task_running (rq, p)) {
indeed - good catch. Andrew, please apply.
Ingo