summaryrefslogtreecommitdiff
path: root/kern
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2014-01-02 16:14:19 +0100
committerJustus Winter <4winter@informatik.uni-hamburg.de>2014-01-03 00:42:40 +0100
commitd775e04dd3ee9648ca91b1df965b435a34632606 (patch)
tree2496b090185cc94cf4e66009546875c1aee2a8e2 /kern
parent2f8477fb3bb1b95d2f814d76cf37777ec58c4c76 (diff)
kern: reduce the size of struct task
* kern/task.h (struct task): Reduce the size of struct task by 2 * sizeof boolean_t by using a bit field for the boolean flags.
Diffstat (limited to 'kern')
-rw-r--r--kern/task.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/kern/task.h b/kern/task.h
index 9bfea57..e852033 100644
--- a/kern/task.h
+++ b/kern/task.h
@@ -52,7 +52,11 @@ struct task {
/* Synchronization/destruction information */
decl_simple_lock_data(,lock) /* Task's lock */
int ref_count; /* Number of references to me */
- boolean_t active; /* Task has not been terminated */
+
+ /* Flags */
+ unsigned int active:1, /* Task has not been terminated */
+ /* boolean_t */ may_assign:1, /* can assigned pset be changed? */
+ assign_active:1; /* waiting for may_assign */
/* Miscellaneous */
vm_map_t map; /* Address space description */
@@ -63,8 +67,6 @@ struct task {
queue_head_t thread_list; /* list of threads */
int thread_count; /* number of threads */
processor_set_t processor_set; /* processor set for new threads */
- boolean_t may_assign; /* can assigned pset be changed? */
- boolean_t assign_active; /* waiting for may_assign */
/* User-visible scheduling information */
int user_stop_count; /* outstanding stops */