aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched_rt.c
diff options
context:
space:
mode:
authorMike Travis <travis@sgi.com>2008-03-26 17:23:49 -0400
committerIngo Molnar <mingo@elte.hu>2008-04-19 13:44:59 -0400
commitcd8ba7cd9be0192348c2836cb6645d9b2cd2bfd2 (patch)
tree3b4138c7b683c2168ac13be41aab74b49a6bcf1c /kernel/sched_rt.c
parente0982e90cd1ecf59818b137386b7f63debded9cc (diff)
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>
Diffstat (limited to 'kernel/sched_rt.c')
-rw-r--r--kernel/sched_rt.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/sched_rt.c b/kernel/sched_rt.c
index 6928ded24da1..8ff824565e06 100644
--- a/kernel/sched_rt.c
+++ b/kernel/sched_rt.c
@@ -1123,7 +1123,8 @@ move_one_task_rt(struct rq *this_rq, int this_cpu, struct rq *busiest,
1123 return 0; 1123 return 0;
1124} 1124}
1125 1125
1126static void set_cpus_allowed_rt(struct task_struct *p, cpumask_t *new_mask) 1126static void set_cpus_allowed_rt(struct task_struct *p,
1127 const cpumask_t *new_mask)
1127{ 1128{
1128 int weight = cpus_weight(*new_mask); 1129 int weight = cpus_weight(*new_mask);
1129 1130