]> git.baikalelectronics.ru Git - kernel.git/commit
sched: add new set_cpus_allowed_ptr function
authorMike Travis <travis@sgi.com>
Wed, 26 Mar 2008 21:23:49 +0000 (14:23 -0700)
committerIngo Molnar <mingo@elte.hu>
Sat, 19 Apr 2008 17:44:59 +0000 (19:44 +0200)
commit3f842846fb7eee8260304727cc4ace3413a9d33c
tree3b4138c7b683c2168ac13be41aab74b49a6bcf1c
parentb50a002ae58f4e5fdafd26dd28eea65fdcced668
sched: add new set_cpus_allowed_ptr function

Add a new function that accepts a pointer to the "newly allowed cpus"
cpumask argument.

int set_cpus_allowed_ptr(struct task_struct *p, const cpumask_t *new_mask)

The current set_cpus_allowed() function is modified to use the above
but this does not result in an ABI change.  And with some compiler
optimization help, it may not introduce any additional overhead.

Additionally, to enforce the read only nature of the new_mask arg, the
"const" property is migrated to sub-functions called by set_cpus_allowed.
This silences compiler warnings.

Signed-off-by: Mike Travis <travis@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
include/linux/sched.h
kernel/sched.c
kernel/sched_rt.c