diff options
author | Peter Zijlstra <peterz@infradead.org> | 2021-06-11 10:28:12 +0200 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2021-06-18 11:43:07 +0200 |
commit | b03fbd4ff24c5f075e58eb19261d5f8b3e40d7c6 (patch) | |
tree | aa8a970bc1cf036c71a1c3201a0cd0ed8fb66636 /arch/hexagon | |
parent | 37aadc687ab441bbcb693ddae613acf9afcea1ab (diff) | |
download | linux-next-b03fbd4ff24c5f075e58eb19261d5f8b3e40d7c6.tar.gz |
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/hexagon')
-rw-r--r-- | arch/hexagon/kernel/process.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/hexagon/kernel/process.c b/arch/hexagon/kernel/process.c index c61165c99ae0..6a6835fb4242 100644 --- a/arch/hexagon/kernel/process.c +++ b/arch/hexagon/kernel/process.c @@ -135,7 +135,7 @@ unsigned long get_wchan(struct task_struct *p) unsigned long fp, pc; unsigned long stack_page; int count = 0; - if (!p || p == current || p->state == TASK_RUNNING) + if (!p || p == current || task_is_running(p)) return 0; stack_page = (unsigned long)task_stack_page(p); |