diff options
author | Li Zefan <lizf@cn.fujitsu.com> | 2008-10-22 03:25:26 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-10-22 04:01:52 -0400 |
commit | 4ce72a2c063a7fa8e42a9435440ae3364115a58d (patch) | |
tree | 427b25960945524a205c7d8ed20ed5f02325175e /kernel/sched_rt.c | |
parent | 0c4b83da58ec2e96ce9c44c211d6eac5f9dae478 (diff) |
sched: add CONFIG_SMP consistency
a patch from Henrik Austad did this:
>> Do not declare select_task_rq as part of sched_class when CONFIG_SMP is
>> not set.
Peter observed:
> While a proper cleanup, could you do it by re-arranging the methods so
> as to not create an additional ifdef?
Do not declare select_task_rq and some other methods as part of sched_class
when CONFIG_SMP is not set.
Also gather those methods to avoid CONFIG_SMP mess.
Idea-by: Henrik Austad <henrik.austad@gmail.com>
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Acked-by: Henrik Austad <henrik@austad.us>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sched_rt.c')
-rw-r--r-- | kernel/sched_rt.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/kernel/sched_rt.c b/kernel/sched_rt.c index cdf5740ab03e..c9aa5bede226 100644 --- a/kernel/sched_rt.c +++ b/kernel/sched_rt.c | |||
@@ -1502,9 +1502,6 @@ static const struct sched_class rt_sched_class = { | |||
1502 | .enqueue_task = enqueue_task_rt, | 1502 | .enqueue_task = enqueue_task_rt, |
1503 | .dequeue_task = dequeue_task_rt, | 1503 | .dequeue_task = dequeue_task_rt, |
1504 | .yield_task = yield_task_rt, | 1504 | .yield_task = yield_task_rt, |
1505 | #ifdef CONFIG_SMP | ||
1506 | .select_task_rq = select_task_rq_rt, | ||
1507 | #endif /* CONFIG_SMP */ | ||
1508 | 1505 | ||
1509 | .check_preempt_curr = check_preempt_curr_rt, | 1506 | .check_preempt_curr = check_preempt_curr_rt, |
1510 | 1507 | ||
@@ -1512,6 +1509,8 @@ static const struct sched_class rt_sched_class = { | |||
1512 | .put_prev_task = put_prev_task_rt, | 1509 | .put_prev_task = put_prev_task_rt, |
1513 | 1510 | ||
1514 | #ifdef CONFIG_SMP | 1511 | #ifdef CONFIG_SMP |
1512 | .select_task_rq = select_task_rq_rt, | ||
1513 | |||
1515 | .load_balance = load_balance_rt, | 1514 | .load_balance = load_balance_rt, |
1516 | .move_one_task = move_one_task_rt, | 1515 | .move_one_task = move_one_task_rt, |
1517 | .set_cpus_allowed = set_cpus_allowed_rt, | 1516 | .set_cpus_allowed = set_cpus_allowed_rt, |