aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched/sched.h
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/sched.h
parentsched/fair: Cleanup for SIS_PROP (diff)
downloadlinux-dev-0b9d46fc5ef7a457cc635b30b010081228cb81ac.tar.xz
linux-dev-0b9d46fc5ef7a457cc635b30b010081228cb81ac.zip
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 '')
-rw-r--r--kernel/sched/sched.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index b75ac74986fb..91b2c7ec53bd 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -2051,7 +2051,7 @@ static inline int task_current(struct rq *rq, struct task_struct *p)
return rq->curr == p;
}
-static inline int task_running(struct rq *rq, struct task_struct *p)
+static inline int task_on_cpu(struct rq *rq, struct task_struct *p)
{
#ifdef CONFIG_SMP
return p->on_cpu;