diff options
author | Peter Zijlstra <peterz@infradead.org> | 2022-09-06 12:39:55 +0200 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2022-09-07 21:53:49 +0200 |
commit | f9fc8cad9728124cefe8844fb53d1814c92c6bfc (patch) | |
tree | 1d8a1b332af2b0f921951310852284b8e556f162 /include/linux/sched.h | |
parent | 9204a97f7ae862fc8a3330ec8335917534c3fb63 (diff) | |
download | linux-stable-f9fc8cad9728124cefe8844fb53d1814c92c6bfc.tar.gz linux-stable-f9fc8cad9728124cefe8844fb53d1814c92c6bfc.tar.bz2 linux-stable-f9fc8cad9728124cefe8844fb53d1814c92c6bfc.zip |
sched: Add TASK_ANY for wait_task_inactive()
Now that wait_task_inactive()'s @match_state argument is a mask (like
ttwu()) it is possible to replace the special !match_state case with
an 'all-states' value such that any blocked state will match.
Suggested-by: Ingo Molnar (mingo@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/YxhkzfuFTvRnpUaH@hirez.programming.kicks-ass.net
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r-- | include/linux/sched.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index e7b2f8a5c711..0facaadbae71 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -101,6 +101,8 @@ struct task_group; #define TASK_RTLOCK_WAIT 0x1000 #define TASK_STATE_MAX 0x2000 +#define TASK_ANY (TASK_STATE_MAX-1) + /* Convenience macros for the sake of set_current_state: */ #define TASK_KILLABLE (TASK_WAKEKILL | TASK_UNINTERRUPTIBLE) #define TASK_STOPPED (TASK_WAKEKILL | __TASK_STOPPED) |