提交 4a8342d2 编写于 作者: L Linus Torvalds

Revert task flag re-ordering, add comments

Roland points out that the flags end up having non-obvious dependencies
elsewhere, so revert aa55a086 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: NLinus Torvalds <torvalds@osdl.org>
上级 aa55a086
......@@ -107,14 +107,26 @@ extern unsigned long nr_iowait(void);
#include <asm/processor.h>
/*
* Task state bitmask. NOTE! These bits are also
* encoded in fs/proc/array.c: get_task_state().
*
* We have two separate sets of flags: task->state
* is about runnability, while task->exit_state are
* about the task exiting. Confusing, but this way
* modifying one set can't modify the other one by
* mistake.
*/
#define TASK_RUNNING 0
#define TASK_INTERRUPTIBLE 1
#define TASK_UNINTERRUPTIBLE 2
#define TASK_NONINTERACTIVE 4
#define TASK_STOPPED 8
#define TASK_TRACED 16
#define EXIT_ZOMBIE 32
#define EXIT_DEAD 64
#define TASK_STOPPED 4
#define TASK_TRACED 8
/* in tsk->exit_state */
#define EXIT_ZOMBIE 16
#define EXIT_DEAD 32
/* in tsk->state again */
#define TASK_NONINTERACTIVE 64
#define __set_task_state(tsk, state_value) \
do { (tsk)->state = (state_value); } while (0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册