diff options
author | Peter Zijlstra <peterz@infradead.org> | 2021-06-11 11:28:12 +0300 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2021-06-18 12:43:07 +0300 |
commit | b03fbd4ff24c5f075e58eb19261d5f8b3e40d7c6 (patch) | |
tree | aa8a970bc1cf036c71a1c3201a0cd0ed8fb66636 /arch/parisc/kernel | |
parent | 37aadc687ab441bbcb693ddae613acf9afcea1ab (diff) | |
download | linux-b03fbd4ff24c5f075e58eb19261d5f8b3e40d7c6.tar.xz |
sched: Introduce task_is_running()
Replace a bunch of 'p->state == TASK_RUNNING' with a new helper:
task_is_running(p).
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Davidlohr Bueso <dave@stgolabs.net>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20210611082838.222401495@infradead.org
Diffstat (limited to 'arch/parisc/kernel')
-rw-r--r-- | arch/parisc/kernel/process.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/parisc/kernel/process.c b/arch/parisc/kernel/process.c index b144fbe29bc1..184ec3c1eae4 100644 --- a/arch/parisc/kernel/process.c +++ b/arch/parisc/kernel/process.c @@ -249,7 +249,7 @@ get_wchan(struct task_struct *p) unsigned long ip; int count = 0; - if (!p || p == current || p->state == TASK_RUNNING) + if (!p || p == current || task_is_running(p)) return 0; /* @@ -260,7 +260,7 @@ get_wchan(struct task_struct *p) do { if (unwind_once(&info) < 0) return 0; - if (p->state == TASK_RUNNING) + if (task_is_running(p)) return 0; ip = info.ip; if (!in_sched_functions(ip)) |