summaryrefslogtreecommitdiff
path: root/kernel/sched/core_sched.c
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2022-09-06 12:33:04 +0200
committerPeter Zijlstra <peterz@infradead.org>2022-09-07 21:53:47 +0200
commit0b9d46fc5ef7a457cc635b30b010081228cb81ac (patch)
tree715488f2910738159a840633ae1f5ba412805980 /kernel/sched/core_sched.c
parent96c1c0cfe493a7ed549169a6f044bbb83e490fb5 (diff)
sched: Rename task_running() to task_on_cpu()
There is some ambiguity about task_running() in that it is unrelated to TASK_RUNNING but instead tests ->on_cpu. As such, rename the thing task_on_cpu(). Suggested-by: Ingo Molnar <mingo@kernel.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lkml.kernel.org/r/Yxhkhn55uHZx+NGl@hirez.programming.kicks-ass.net
Diffstat (limited to 'kernel/sched/core_sched.c')
-rw-r--r--kernel/sched/core_sched.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/sched/core_sched.c b/kernel/sched/core_sched.c
index 1ec807fbde56..a57fd8f27498 100644
--- a/kernel/sched/core_sched.c
+++ b/kernel/sched/core_sched.c
@@ -88,7 +88,7 @@ static unsigned long sched_core_update_cookie(struct task_struct *p,
* core has now entered/left forced idle state. Defer accounting to the
* next scheduling edge, rather than always forcing a reschedule here.
*/
- if (task_running(rq, p))
+ if (task_on_cpu(rq, p))
resched_curr(rq);
task_rq_unlock(rq, p, &rf);