sched: convert struct (sys_)sched_setaffinity() to cpumask_var_t.
authorRusty Russell <rusty@rustcorp.com.au>
Mon, 24 Nov 2008 16:05:11 +0000 (02:35 +1030)
committerIngo Molnar <mingo@elte.hu>
Mon, 24 Nov 2008 16:51:59 +0000 (17:51 +0100)
commit5a16f3d30ca4e3f166d691220c003066a14e32b5
tree8e65fa8dc91f12a6be37c36d71bb48d2c97d6447
parente76bd8d9850c2296a7e8e24c9dce9b5e6b55fe2f
sched: convert struct (sys_)sched_setaffinity() to cpumask_var_t.

Impact: stack usage reduction

Dynamically allocating cpumasks (when CONFIG_CPUMASK_OFFSTACK) saves
space on the stack.  cpumask_var_t is just a struct cpumask for
!CONFIG_CPUMASK_OFFSTACK.

Note the removal of the initializer of new_mask: since the first thing
we did was "cpus_and(new_mask, new_mask, cpus_allowed)" I just changed
that to "cpumask_and(new_mask, in_mask, cpus_allowed);".

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/sched.c