* @param ops Pointer to this instance of the scheduler structure
*/
static void
-a653sched_deinit(const struct scheduler *ops)
+a653sched_deinit(struct scheduler *ops)
{
xfree(SCHED_PRIV(ops));
+ ops->sched_data = NULL;
}
/**
}
static void
-csched_deinit(const struct scheduler *ops)
+csched_deinit(struct scheduler *ops)
{
struct csched_private *prv;
prv = CSCHED_PRIV(ops);
if ( prv != NULL )
{
+ ops->sched_data = NULL;
free_cpumask_var(prv->cpus);
free_cpumask_var(prv->idlers);
xfree(prv);
- now % MICROSECS(prv->tick_period_us) );
}
-static struct csched_private _csched_priv;
-
static const struct scheduler sched_credit_def = {
.name = "SMP Credit Scheduler",
.opt_name = "credit",
.sched_id = XEN_SCHEDULER_CREDIT,
- .sched_data = &_csched_priv,
+ .sched_data = NULL,
.init_domain = csched_dom_init,
.destroy_domain = csched_dom_destroy,
}
static void
-csched2_deinit(const struct scheduler *ops)
+csched2_deinit(struct scheduler *ops)
{
struct csched2_private *prv;
prv = CSCHED2_PRIV(ops);
+ ops->sched_data = NULL;
xfree(prv);
}
-
-static struct csched2_private _csched2_priv;
-
static const struct scheduler sched_credit2_def = {
.name = "SMP Credit Scheduler rev2",
.opt_name = "credit2",
.sched_id = XEN_SCHEDULER_CREDIT2,
- .sched_data = &_csched2_priv,
+ .sched_data = NULL,
.init_domain = csched2_dom_init,
.destroy_domain = csched2_dom_destroy,
}
static void
-rt_deinit(const struct scheduler *ops)
+rt_deinit(struct scheduler *ops)
{
struct rt_private *prv = rt_priv(ops);
xfree(_cpumask_scratch);
_cpumask_scratch = NULL;
}
+ ops->sched_data = NULL;
xfree(prv);
}
return rc;
}
-static struct rt_private _rt_priv;
-
static const struct scheduler sched_rtds_def = {
.name = "SMP RTDS Scheduler",
.opt_name = "rtds",
.sched_id = XEN_SCHEDULER_RTDS,
- .sched_data = &_rt_priv,
+ .sched_data = NULL,
.dump_cpu_state = rt_dump_pcpu,
.dump_settings = rt_dump,
int (*global_init) (void);
int (*init) (struct scheduler *);
- void (*deinit) (const struct scheduler *);
+ void (*deinit) (struct scheduler *);
void (*free_vdata) (const struct scheduler *, void *);
void * (*alloc_vdata) (const struct scheduler *, struct vcpu *,