[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v5 5/5] sched: Use the auto-generated list of schedulers



>>> On 14.01.16 at 15:49, <jonathan.creekmore@xxxxxxxxx> wrote:
> --- a/xen/common/schedule.c
> +++ b/xen/common/schedule.c
> @@ -64,20 +64,9 @@ static void poll_timer_fn(void *data);
>  DEFINE_PER_CPU(struct schedule_data, schedule_data);
>  DEFINE_PER_CPU(struct scheduler *, scheduler);
>  
> -static const struct scheduler *schedulers[] = {
> -#ifdef CONFIG_SCHED_CREDIT
> -    &sched_credit_def,
> -#endif
> -#ifdef CONFIG_SCHED_CREDIT2
> -    &sched_credit2_def,
> -#endif
> -#ifdef CONFIG_SCHED_ARINC653
> -    &sched_arinc653_def,
> -#endif
> -#ifdef CONFIG_SCHED_RTDS
> -    &sched_rtds_def,
> -#endif
> -};
> +extern const struct scheduler *__start_schedulers_array[], 
> *__end_schedulers_array[];
> +#define NUM_SCHEDULERS (__end_schedulers_array - __start_schedulers_array)
> +static const struct scheduler **schedulers = __start_schedulers_array;

#define or properly constified (to help the compiler recognize it
won't ever change).

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.