Justus Winter, le Thu 02 Jan 2014 20:02:45 +0100, a écrit : > * 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.
Ack. > --- > 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 > -- Samuel R: Parce que ça renverse bêtement l'ordre naturel de lecture! Q: Mais pourquoi citer en fin d'article est-il si effroyable? R: Citer en fin d'article Q: Quelle est la chose la plus désagréable sur les groupes de news?