[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 4/5] kern: reduce the size of struct task
From: |
Justus Winter |
Subject: |
[PATCH 4/5] kern: reduce the size of struct task |
Date: |
Thu, 2 Jan 2014 20:02:45 +0100 |
* 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.
---
kern/task.h | 8 +++++---
1 file 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 */
--
1.8.5.2