lkml.org 
[lkml]   [2008]   [Oct]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: sched: add CONFIG_SMP consistency
From
Date
On Tue, 2008-10-21 at 20:45 +0200, henrik@austad.us wrote:
> From: Henrik Austad <henrik.austad@gmail.com>
>
> Do not declare select_task_rq as part of sched_class when CONFIG_SMP is
> not set.

While a proper cleanup, could you do it by re-arranging the methods so
as to not create an additional ifdef?

Thanks

> Signed-off-by: Henrik Austad <henrik.austad@gmail.com>
> ---
> include/linux/sched.h | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/include/linux/sched.h b/include/linux/sched.h
> index c226c7b..9e0e33c 100644
> --- a/include/linux/sched.h
> +++ b/include/linux/sched.h
> @@ -898,8 +898,9 @@ struct sched_class {
> void (*enqueue_task) (struct rq *rq, struct task_struct *p, int wakeup);
> void (*dequeue_task) (struct rq *rq, struct task_struct *p, int sleep);
> void (*yield_task) (struct rq *rq);
> +#ifdef CONFIG_SMP
> int (*select_task_rq)(struct task_struct *p, int sync);
> -
> +#endif
> void (*check_preempt_curr) (struct rq *rq, struct task_struct *p, int sync);
>
> struct task_struct * (*pick_next_task) (struct rq *rq);


\
 
 \ /
  Last update: 2008-10-21 21:03    [W:0.055 / U:0.940 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site