diff options
author | Matthew Wilcox <matthew@wil.cx> | 2007-12-06 11:13:16 -0500 |
---|---|---|
committer | Matthew Wilcox <willy@linux.intel.com> | 2007-12-06 17:35:28 -0500 |
commit | f021a3c2b14d0dd082c2cee890c204d9e1dee52b (patch) | |
tree | aa37eb6845605de6c69a70ac8cc3b22e2b0170a6 /include | |
parent | 338077e54e17e656da470a84724b773816207316 (diff) |
Add TASK_WAKEKILL
Set TASK_WAKEKILL for TASK_STOPPED and TASK_TRACED, add TASK_KILLABLE and
use TASK_WAKEKILL in signal_wake_up()
Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/sched.h | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index 69233c7fe28d..70d87f2fd23e 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -170,27 +170,33 @@ print_cfs_rq(struct seq_file *m, int cpu, struct cfs_rq *cfs_rq) | |||
170 | #define TASK_RUNNING 0 | 170 | #define TASK_RUNNING 0 |
171 | #define TASK_INTERRUPTIBLE 1 | 171 | #define TASK_INTERRUPTIBLE 1 |
172 | #define TASK_UNINTERRUPTIBLE 2 | 172 | #define TASK_UNINTERRUPTIBLE 2 |
173 | #define TASK_STOPPED 4 | 173 | #define __TASK_STOPPED 4 |
174 | #define TASK_TRACED 8 | 174 | #define __TASK_TRACED 8 |
175 | /* in tsk->exit_state */ | 175 | /* in tsk->exit_state */ |
176 | #define EXIT_ZOMBIE 16 | 176 | #define EXIT_ZOMBIE 16 |
177 | #define EXIT_DEAD 32 | 177 | #define EXIT_DEAD 32 |
178 | /* in tsk->state again */ | 178 | /* in tsk->state again */ |
179 | #define TASK_DEAD 64 | 179 | #define TASK_DEAD 64 |
180 | #define TASK_WAKEKILL 128 | ||
181 | |||
182 | /* Convenience macros for the sake of set_task_state */ | ||
183 | #define TASK_KILLABLE (TASK_WAKEKILL | TASK_UNINTERRUPTIBLE) | ||
184 | #define TASK_STOPPED (TASK_WAKEKILL | __TASK_STOPPED) | ||
185 | #define TASK_TRACED (TASK_WAKEKILL | __TASK_TRACED) | ||
180 | 186 | ||
181 | /* Convenience macros for the sake of wake_up */ | 187 | /* Convenience macros for the sake of wake_up */ |
182 | #define TASK_NORMAL (TASK_INTERRUPTIBLE | TASK_UNINTERRUPTIBLE) | 188 | #define TASK_NORMAL (TASK_INTERRUPTIBLE | TASK_UNINTERRUPTIBLE) |
183 | #define TASK_ALL (TASK_NORMAL | TASK_STOPPED | TASK_TRACED) | 189 | #define TASK_ALL (TASK_NORMAL | __TASK_STOPPED | __TASK_TRACED) |
184 | 190 | ||
185 | /* get_task_state() */ | 191 | /* get_task_state() */ |
186 | #define TASK_REPORT (TASK_RUNNING | TASK_INTERRUPTIBLE | \ | 192 | #define TASK_REPORT (TASK_RUNNING | TASK_INTERRUPTIBLE | \ |
187 | TASK_UNINTERRUPTIBLE | TASK_STOPPED | \ | 193 | TASK_UNINTERRUPTIBLE | __TASK_STOPPED | \ |
188 | TASK_TRACED) | 194 | __TASK_TRACED) |
189 | 195 | ||
190 | #define task_is_traced(task) ((task->state & TASK_TRACED) != 0) | 196 | #define task_is_traced(task) ((task->state & __TASK_TRACED) != 0) |
191 | #define task_is_stopped(task) ((task->state & TASK_STOPPED) != 0) | 197 | #define task_is_stopped(task) ((task->state & __TASK_STOPPED) != 0) |
192 | #define task_is_stopped_or_traced(task) \ | 198 | #define task_is_stopped_or_traced(task) \ |
193 | ((task->state & (TASK_STOPPED | TASK_TRACED)) != 0) | 199 | ((task->state & (__TASK_STOPPED | __TASK_TRACED)) != 0) |
194 | #define task_contributes_to_load(task) \ | 200 | #define task_contributes_to_load(task) \ |
195 | ((task->state & TASK_UNINTERRUPTIBLE) != 0) | 201 | ((task->state & TASK_UNINTERRUPTIBLE) != 0) |
196 | 202 | ||