aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sched.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2005-09-29 18:18:21 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-29 18:18:21 -0400
commit4a8342d233a39ee582e9f7260e12d2f5fd194a05 (patch)
treecf0972e1deec828977794cc300597bb448535d4c /include/linux/sched.h
parentaa55a08687059aa169d10a313c41f238c2070488 (diff)
Revert task flag re-ordering, add comments
Roland points out that the flags end up having non-obvious dependencies elsewhere, so revert aa55a08687059aa169d10a313c41f238c2070488 and add some comments about why things are as they are. We'll just have to fix up the broken comparisons. Roland has a patch. Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r--include/linux/sched.h22
1 files changed, 17 insertions, 5 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index afe6c61f13e..c3ba31f210a 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -107,14 +107,26 @@ extern unsigned long nr_iowait(void);
107 107
108#include <asm/processor.h> 108#include <asm/processor.h>
109 109
110/*
111 * Task state bitmask. NOTE! These bits are also
112 * encoded in fs/proc/array.c: get_task_state().
113 *
114 * We have two separate sets of flags: task->state
115 * is about runnability, while task->exit_state are
116 * about the task exiting. Confusing, but this way
117 * modifying one set can't modify the other one by
118 * mistake.
119 */
110#define TASK_RUNNING 0 120#define TASK_RUNNING 0
111#define TASK_INTERRUPTIBLE 1 121#define TASK_INTERRUPTIBLE 1
112#define TASK_UNINTERRUPTIBLE 2 122#define TASK_UNINTERRUPTIBLE 2
113#define TASK_NONINTERACTIVE 4 123#define TASK_STOPPED 4
114#define TASK_STOPPED 8 124#define TASK_TRACED 8
115#define TASK_TRACED 16 125/* in tsk->exit_state */
116#define EXIT_ZOMBIE 32 126#define EXIT_ZOMBIE 16
117#define EXIT_DEAD 64 127#define EXIT_DEAD 32
128/* in tsk->state again */
129#define TASK_NONINTERACTIVE 64
118 130
119#define __set_task_state(tsk, state_value) \ 131#define __set_task_state(tsk, state_value) \
120 do { (tsk)->state = (state_value); } while (0) 132 do { (tsk)->state = (state_value); } while (0)