diff options
author | Con Kolivas <kernel@kolivas.org> | 2006-03-31 10:31:23 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-31 20:18:58 (GMT) |
commit | 3dee386e14045484a6c41c8f03a263f9d79de740 (patch) | |
tree | 4b1643508ad94981e8d4deb5136d0a626e60932d /include | |
parent | db1b1fefc2cecbff2e4214062fa8c680cb6e7b7d (diff) | |
download | linux-3dee386e14045484a6c41c8f03a263f9d79de740.tar.xz |
[PATCH] sched: cleanup task_activated()
The activated flag in task_struct is used to track different sleep types and
its usage is somewhat obfuscated. Convert the variable to an enum with more
descriptive names without altering the function.
Signed-off-by: Con Kolivas <kernel@kolivas.org>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/sched.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index ab84adf..c4fd3fc 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -684,6 +684,13 @@ static inline void prefetch_stack(struct task_struct *t) { } struct audit_context; /* See audit.c */ struct mempolicy; +enum sleep_type { + SLEEP_NORMAL, + SLEEP_NONINTERACTIVE, + SLEEP_INTERACTIVE, + SLEEP_INTERRUPTED, +}; + struct task_struct { volatile long state; /* -1 unrunnable, 0 runnable, >0 stopped */ struct thread_info *thread_info; @@ -706,7 +713,7 @@ struct task_struct { unsigned long sleep_avg; unsigned long long timestamp, last_ran; unsigned long long sched_time; /* sched_clock time spent running */ - int activated; + enum sleep_type sleep_type; unsigned long policy; cpumask_t cpus_allowed; |