* <li> !0 = error
* </ul>
*/
-static int
+static int cf_check
a653sched_init(struct scheduler *ops)
{
a653sched_priv_t *prv;
*
* @param ops Pointer to this instance of the scheduler structure
*/
-static void
+static void cf_check
a653sched_deinit(struct scheduler *ops)
{
xfree(SCHED_PRIV(ops));
*
* @return Pointer to the allocated data
*/
-static void *
+static void *cf_check
a653sched_alloc_udata(const struct scheduler *ops, struct sched_unit *unit,
void *dd)
{
*
* @param ops Pointer to this instance of the scheduler structure
*/
-static void
+static void cf_check
a653sched_free_udata(const struct scheduler *ops, void *priv)
{
a653sched_priv_t *sched_priv = SCHED_PRIV(ops);
* @param ops Pointer to this instance of the scheduler structure
* @param unit Pointer to struct sched_unit
*/
-static void
+static void cf_check
a653sched_unit_sleep(const struct scheduler *ops, struct sched_unit *unit)
{
if ( AUNIT(unit) != NULL )
* @param ops Pointer to this instance of the scheduler structure
* @param unit Pointer to struct sched_unit
*/
-static void
+static void cf_check
a653sched_unit_wake(const struct scheduler *ops, struct sched_unit *unit)
{
if ( AUNIT(unit) != NULL )
* @param ops Pointer to this instance of the scheduler structure
* @param now Current time
*/
-static void
+static void cf_check
a653sched_do_schedule(
const struct scheduler *ops,
struct sched_unit *prev,
*
* @return Scheduler resource to run on
*/
-static struct sched_resource *
+static struct sched_resource *cf_check
a653sched_pick_resource(const struct scheduler *ops,
const struct sched_unit *unit)
{
* @param pdata scheduler specific PCPU data (we don't have any)
* @param vdata scheduler specific UNIT data of the idle unit
*/
-static spinlock_t *
+static spinlock_t *cf_check
a653_switch_sched(struct scheduler *new_ops, unsigned int cpu,
void *pdata, void *vdata)
{
* @param ops Pointer to this instance of the scheduler structure
* @param sc Pointer to the scheduler operation specified by Domain 0
*/
-static int
+static int cf_check
a653sched_adjust_global(const struct scheduler *ops,
struct xen_sysctl_scheduler_op *sc)
{
static void sched_set_affinity(
struct sched_unit *unit, const cpumask_t *hard, const cpumask_t *soft);
-static struct sched_resource *
+static struct sched_resource *cf_check
sched_idle_res_pick(const struct scheduler *ops, const struct sched_unit *unit)
{
return unit->res;
}
-static void *
+static void *cf_check
sched_idle_alloc_udata(const struct scheduler *ops, struct sched_unit *unit,
void *dd)
{
return ZERO_BLOCK_PTR;
}
-static void
+static void cf_check
sched_idle_free_udata(const struct scheduler *ops, void *priv)
{
}
-static void sched_idle_schedule(
+static void cf_check sched_idle_schedule(
const struct scheduler *ops, struct sched_unit *unit, s_time_t now,
bool tasklet_work_scheduled)
{
SCHED_STAT_CRANK(tickled_no_cpu);
}
-static void
+static void cf_check
csched_free_pdata(const struct scheduler *ops, void *pcpu, int cpu)
{
const struct csched_private *prv = CSCHED_PRIV(ops);
xfree(pcpu);
}
-static void
+static void cf_check
csched_deinit_pdata(const struct scheduler *ops, void *pcpu, int cpu)
{
struct csched_private *prv = CSCHED_PRIV(ops);
spin_unlock_irqrestore(&prv->lock, flags);
}
-static void *
+static void *cf_check
csched_alloc_pdata(const struct scheduler *ops, int cpu)
{
struct csched_pcpu *spc;
}
/* Change the scheduler of cpu to us (Credit). */
-static spinlock_t *
+static spinlock_t *cf_check
csched_switch_sched(struct scheduler *new_ops, unsigned int cpu,
void *pdata, void *vdata)
{
return cpu;
}
-static struct sched_resource *
+static struct sched_resource *cf_check
csched_res_pick(const struct scheduler *ops, const struct sched_unit *unit)
{
struct csched_unit *svc = CSCHED_UNIT(unit);
}
}
-static void *
-csched_alloc_udata(const struct scheduler *ops, struct sched_unit *unit,
- void *dd)
+static void *cf_check csched_alloc_udata(
+ const struct scheduler *ops, struct sched_unit *unit, void *dd)
{
struct csched_unit *svc;
return svc;
}
-static void
+static void cf_check
csched_unit_insert(const struct scheduler *ops, struct sched_unit *unit)
{
struct csched_unit *svc = unit->priv;
SCHED_STAT_CRANK(unit_insert);
}
-static void
+static void cf_check
csched_free_udata(const struct scheduler *ops, void *priv)
{
struct csched_unit *svc = priv;
xfree(svc);
}
-static void
+static void cf_check
csched_unit_remove(const struct scheduler *ops, struct sched_unit *unit)
{
struct csched_private *prv = CSCHED_PRIV(ops);
BUG_ON( sdom == NULL );
}
-static void
+static void cf_check
csched_unit_sleep(const struct scheduler *ops, struct sched_unit *unit)
{
struct csched_unit * const svc = CSCHED_UNIT(unit);
runq_remove(svc);
}
-static void
+static void cf_check
csched_unit_wake(const struct scheduler *ops, struct sched_unit *unit)
{
struct csched_unit * const svc = CSCHED_UNIT(unit);
__runq_tickle(svc);
}
-static void
+static void cf_check
csched_unit_yield(const struct scheduler *ops, struct sched_unit *unit)
{
struct csched_unit * const svc = CSCHED_UNIT(unit);
set_bit(CSCHED_FLAG_UNIT_YIELD, &svc->flags);
}
-static int
+static int cf_check
csched_dom_cntl(
const struct scheduler *ops,
struct domain *d,
return rc;
}
-static void
+static void cf_check
csched_aff_cntl(const struct scheduler *ops, struct sched_unit *unit,
const cpumask_t *hard, const cpumask_t *soft)
{
prv->credit = prv->credits_per_tslice * prv->ncpus;
}
-static int
+static int cf_check
csched_sys_cntl(const struct scheduler *ops,
struct xen_sysctl_scheduler_op *sc)
{
return rc;
}
-static void *
+static void *cf_check
csched_alloc_domdata(const struct scheduler *ops, struct domain *dom)
{
struct csched_dom *sdom;
return sdom;
}
-static void
+static void cf_check
csched_free_domdata(const struct scheduler *ops, void *data)
{
xfree(data);
* This function is in the critical path. It is designed to be simple and
* fast for the common case.
*/
-static void csched_schedule(
+static void cf_check csched_schedule(
const struct scheduler *ops, struct sched_unit *unit, s_time_t now,
bool tasklet_work_scheduled)
{
printk("\n");
}
-static void
+static void cf_check
csched_dump_pcpu(const struct scheduler *ops, int cpu)
{
const struct list_head *runq;
spin_unlock_irqrestore(&prv->lock, flags);
}
-static void
+static void cf_check
csched_dump(const struct scheduler *ops)
{
struct list_head *iter_sdom, *iter_svc;
spin_unlock_irqrestore(&prv->lock, flags);
}
-static int __init
+static int __init cf_check
csched_global_init(void)
{
if ( sched_credit_tslice_ms > XEN_SYSCTL_CSCHED_TSLICE_MAX ||
return 0;
}
-static int
+static int cf_check
csched_init(struct scheduler *ops)
{
struct csched_private *prv;
return 0;
}
-static void
+static void cf_check
csched_deinit(struct scheduler *ops)
{
struct csched_private *prv;
#define CSCHED2_UNIT_CHECK(unit)
#endif
-static void *
+static void *cf_check
csched2_alloc_udata(const struct scheduler *ops, struct sched_unit *unit,
void *dd)
{
return svc;
}
-static void
+static void cf_check
csched2_unit_sleep(const struct scheduler *ops, struct sched_unit *unit)
{
struct csched2_unit * const svc = csched2_unit(unit);
__clear_bit(__CSFLAG_delayed_runq_add, &svc->flags);
}
-static void
+static void cf_check
csched2_unit_wake(const struct scheduler *ops, struct sched_unit *unit)
{
struct csched2_unit * const svc = csched2_unit(unit);
return;
}
-static void
+static void cf_check
csched2_unit_yield(const struct scheduler *ops, struct sched_unit *unit)
{
struct csched2_unit * const svc = csched2_unit(unit);
__set_bit(__CSFLAG_unit_yield, &svc->flags);
}
-static void
+static void cf_check
csched2_context_saved(const struct scheduler *ops, struct sched_unit *unit)
{
struct csched2_unit * const svc = csched2_unit(unit);
}
#define MAX_LOAD (STIME_MAX)
-static struct sched_resource *
+static struct sched_resource *cf_check
csched2_res_pick(const struct scheduler *ops, const struct sched_unit *unit)
{
struct csched2_private *prv = csched2_priv(ops);
return;
}
-static void
-csched2_unit_migrate(
+static void cf_check csched2_unit_migrate(
const struct scheduler *ops, struct sched_unit *unit, unsigned int new_cpu)
{
struct csched2_unit * const svc = csched2_unit(unit);
sched_set_res(unit, get_sched_res(new_cpu));
}
-static int
+static int cf_check
csched2_dom_cntl(
const struct scheduler *ops,
struct domain *d,
return rc;
}
-static void
+static void cf_check
csched2_aff_cntl(const struct scheduler *ops, struct sched_unit *unit,
const cpumask_t *hard, const cpumask_t *soft)
{
__clear_bit(__CSFLAG_pinned, &svc->flags);
}
-static int csched2_sys_cntl(const struct scheduler *ops,
- struct xen_sysctl_scheduler_op *sc)
+static int cf_check csched2_sys_cntl(
+ const struct scheduler *ops, struct xen_sysctl_scheduler_op *sc)
{
struct xen_sysctl_credit2_schedule *params = &sc->u.sched_credit2;
struct csched2_private *prv = csched2_priv(ops);
return 0;
}
-static void *
+static void *cf_check
csched2_alloc_domdata(const struct scheduler *ops, struct domain *dom)
{
struct csched2_private *prv = csched2_priv(ops);
return sdom;
}
-static void
+static void cf_check
csched2_free_domdata(const struct scheduler *ops, void *data)
{
struct csched2_dom *sdom = data;
}
}
-static void
+static void cf_check
csched2_unit_insert(const struct scheduler *ops, struct sched_unit *unit)
{
const struct csched2_unit *svc = unit->priv;
CSCHED2_UNIT_CHECK(unit);
}
-static void
+static void cf_check
csched2_free_udata(const struct scheduler *ops, void *priv)
{
struct csched2_unit *svc = priv;
xfree(svc);
}
-static void
+static void cf_check
csched2_unit_remove(const struct scheduler *ops, struct sched_unit *unit)
{
struct csched2_unit * const svc = csched2_unit(unit);
* This function is in the critical path. It is designed to be simple and
* fast for the common case.
*/
-static void csched2_schedule(
+static void cf_check csched2_schedule(
const struct scheduler *ops, struct sched_unit *currunit, s_time_t now,
bool tasklet_work_scheduled)
{
}
}
-static void
+static void cf_check
csched2_dump(const struct scheduler *ops)
{
struct list_head *iter_sdom;
read_unlock_irqrestore(&prv->lock, flags);
}
-static void *
+static void *cf_check
csched2_alloc_pdata(const struct scheduler *ops, int cpu)
{
struct csched2_pcpu *spc;
}
/* Change the scheduler of cpu to us (Credit2). */
-static spinlock_t *
+static spinlock_t *cf_check
csched2_switch_sched(struct scheduler *new_ops, unsigned int cpu,
void *pdata, void *vdata)
{
return &rqd->lock;
}
-static void
+static void cf_check
csched2_deinit_pdata(const struct scheduler *ops, void *pcpu, int cpu)
{
unsigned long flags;
return;
}
-static void
+static void cf_check
csched2_free_pdata(const struct scheduler *ops, void *pcpu, int cpu)
{
struct csched2_private *prv = csched2_priv(ops);
xfree(pcpu);
}
-static int __init
+static int __init cf_check
csched2_global_init(void)
{
if ( opt_load_precision_shift < LOADAVG_PRECISION_SHIFT_MIN )
return 0;
}
-static int
+static int cf_check
csched2_init(struct scheduler *ops)
{
struct csched2_private *prv;
return 0;
}
-static void
+static void cf_check
csched2_deinit(struct scheduler *ops)
{
struct csched2_private *prv;
return cpumask_test_cpu(cpu, cpumask_scratch_cpu(cpu));
}
-static int null_init(struct scheduler *ops)
+static int cf_check null_init(struct scheduler *ops)
{
struct null_private *prv;
return 0;
}
-static void null_deinit(struct scheduler *ops)
+static void cf_check null_deinit(struct scheduler *ops)
{
xfree(ops->sched_data);
ops->sched_data = NULL;
npc->unit = NULL;
}
-static void null_deinit_pdata(const struct scheduler *ops, void *pcpu, int cpu)
+static void cf_check null_deinit_pdata(
+ const struct scheduler *ops, void *pcpu, int cpu)
{
struct null_private *prv = null_priv(ops);
struct null_pcpu *npc = pcpu;
npc->unit = NULL;
}
-static void *null_alloc_pdata(const struct scheduler *ops, int cpu)
+static void *cf_check null_alloc_pdata(const struct scheduler *ops, int cpu)
{
struct null_pcpu *npc;
return npc;
}
-static void null_free_pdata(const struct scheduler *ops, void *pcpu, int cpu)
+static void cf_check null_free_pdata(
+ const struct scheduler *ops, void *pcpu, int cpu)
{
xfree(pcpu);
}
-static void *null_alloc_udata(const struct scheduler *ops,
- struct sched_unit *unit, void *dd)
+static void *cf_check null_alloc_udata(
+ const struct scheduler *ops, struct sched_unit *unit, void *dd)
{
struct null_unit *nvc;
return nvc;
}
-static void null_free_udata(const struct scheduler *ops, void *priv)
+static void cf_check null_free_udata(const struct scheduler *ops, void *priv)
{
struct null_unit *nvc = priv;
xfree(nvc);
}
-static void * null_alloc_domdata(const struct scheduler *ops,
- struct domain *d)
+static void *cf_check null_alloc_domdata(
+ const struct scheduler *ops, struct domain *d)
{
struct null_private *prv = null_priv(ops);
struct null_dom *ndom;
return ndom;
}
-static void null_free_domdata(const struct scheduler *ops, void *data)
+static void cf_check null_free_domdata(const struct scheduler *ops, void *data)
{
struct null_dom *ndom = data;
struct null_private *prv = null_priv(ops);
}
/* Change the scheduler of cpu to us (null). */
-static spinlock_t *null_switch_sched(struct scheduler *new_ops,
- unsigned int cpu,
- void *pdata, void *vdata)
+static spinlock_t *cf_check null_switch_sched(
+ struct scheduler *new_ops, unsigned int cpu, void *pdata, void *vdata)
{
struct sched_resource *sr = get_sched_res(cpu);
struct null_private *prv = null_priv(new_ops);
return &sr->_lock;
}
-static void null_unit_insert(const struct scheduler *ops,
- struct sched_unit *unit)
+static void cf_check null_unit_insert(
+ const struct scheduler *ops, struct sched_unit *unit)
{
struct null_private *prv = null_priv(ops);
struct null_unit *nvc = null_unit(unit);
SCHED_STAT_CRANK(unit_insert);
}
-static void null_unit_remove(const struct scheduler *ops,
- struct sched_unit *unit)
+static void cf_check null_unit_remove(
+ const struct scheduler *ops, struct sched_unit *unit)
{
struct null_private *prv = null_priv(ops);
struct null_unit *nvc = null_unit(unit);
SCHED_STAT_CRANK(unit_remove);
}
-static void null_unit_wake(const struct scheduler *ops,
- struct sched_unit *unit)
+static void cf_check null_unit_wake(
+ const struct scheduler *ops, struct sched_unit *unit)
{
struct null_private *prv = null_priv(ops);
struct null_unit *nvc = null_unit(unit);
cpumask_raise_softirq(cpumask_scratch_cpu(cpu), SCHEDULE_SOFTIRQ);
}
-static void null_unit_sleep(const struct scheduler *ops,
- struct sched_unit *unit)
+static void cf_check null_unit_sleep(
+ const struct scheduler *ops, struct sched_unit *unit)
{
struct null_private *prv = null_priv(ops);
unsigned int cpu = sched_unit_master(unit);
SCHED_STAT_CRANK(unit_sleep);
}
-static struct sched_resource *
+static struct sched_resource *cf_check
null_res_pick(const struct scheduler *ops, const struct sched_unit *unit)
{
ASSERT(!is_idle_unit(unit));
return pick_res(null_priv(ops), unit);
}
-static void null_unit_migrate(const struct scheduler *ops,
- struct sched_unit *unit, unsigned int new_cpu)
+static void cf_check null_unit_migrate(
+ const struct scheduler *ops, struct sched_unit *unit, unsigned int new_cpu)
{
struct null_private *prv = null_priv(ops);
struct null_unit *nvc = null_unit(unit);
* - the unit assigned to the pCPU, if there's one and it can run;
* - the idle unit, otherwise.
*/
-static void null_schedule(const struct scheduler *ops, struct sched_unit *prev,
- s_time_t now, bool tasklet_work_scheduled)
+static void cf_check null_schedule(
+ const struct scheduler *ops, struct sched_unit *prev, s_time_t now,
+ bool tasklet_work_scheduled)
{
unsigned int bs;
const unsigned int cur_cpu = smp_processor_id();
sched_unit_master(nvc->unit) : -1);
}
-static void null_dump_pcpu(const struct scheduler *ops, int cpu)
+static void cf_check null_dump_pcpu(const struct scheduler *ops, int cpu)
{
struct null_private *prv = null_priv(ops);
const struct null_pcpu *npc = get_sched_res(cpu)->sched_priv;
pcpu_schedule_unlock_irqrestore(lock, flags, cpu);
}
-static void null_dump(const struct scheduler *ops)
+static void cf_check null_dump(const struct scheduler *ops)
{
struct null_private *prv = null_priv(ops);
struct list_head *iter;
return !list_empty(&svc->q_elem);
}
-static struct rt_unit *
+static struct rt_unit *cf_check
q_elem(struct list_head *elem)
{
return list_entry(elem, struct rt_unit, q_elem);
}
-static struct rt_unit *
+static struct rt_unit *cf_check
replq_elem(struct list_head *elem)
{
return list_entry(elem, struct rt_unit, replq_elem);
svc->flags, CPUMASK_PR(mask));
}
-static void
+static void cf_check
rt_dump_pcpu(const struct scheduler *ops, int cpu)
{
struct rt_private *prv = rt_priv(ops);
spin_unlock_irqrestore(&prv->lock, flags);
}
-static void
+static void cf_check
rt_dump(const struct scheduler *ops)
{
struct list_head *runq, *depletedq, *replq, *iter;
* Valid resource of an unit is intesection of unit's affinity
* and available resources
*/
-static struct sched_resource *
+static struct sched_resource *cf_check
rt_res_pick_locked(const struct sched_unit *unit, unsigned int locked_cpu)
{
cpumask_t *cpus = cpumask_scratch_cpu(locked_cpu);
* Valid resource of an unit is intesection of unit's affinity
* and available resources
*/
-static struct sched_resource *
+static struct sched_resource *cf_check
rt_res_pick(const struct scheduler *ops, const struct sched_unit *unit)
{
struct sched_resource *res;
/*
* Init/Free related code
*/
-static int
+static int cf_check
rt_init(struct scheduler *ops)
{
int rc = -ENOMEM;
return rc;
}
-static void
+static void cf_check
rt_deinit(struct scheduler *ops)
{
struct rt_private *prv = rt_priv(ops);
}
/* Change the scheduler of cpu to us (RTDS). */
-static spinlock_t *
+static spinlock_t *cf_check
rt_switch_sched(struct scheduler *new_ops, unsigned int cpu,
void *pdata, void *vdata)
{
return &prv->lock;
}
-static void
+static void cf_check
rt_deinit_pdata(const struct scheduler *ops, void *pcpu, int cpu)
{
unsigned long flags;
spin_unlock_irqrestore(&prv->lock, flags);
}
-static void *
+static void *cf_check
rt_alloc_domdata(const struct scheduler *ops, struct domain *dom)
{
unsigned long flags;
return sdom;
}
-static void
+static void cf_check
rt_free_domdata(const struct scheduler *ops, void *data)
{
struct rt_dom *sdom = data;
}
}
-static void *
+static void * cf_check
rt_alloc_udata(const struct scheduler *ops, struct sched_unit *unit, void *dd)
{
struct rt_unit *svc;
return svc;
}
-static void
+static void cf_check
rt_free_udata(const struct scheduler *ops, void *priv)
{
struct rt_unit *svc = priv;
* It inserts units of moving domain to the scheduler's RunQ in
* dest. cpupool.
*/
-static void
+static void cf_check
rt_unit_insert(const struct scheduler *ops, struct sched_unit *unit)
{
struct rt_unit *svc = rt_unit(unit);
/*
* Remove rt_unit svc from the old scheduler in source cpupool.
*/
-static void
+static void cf_check
rt_unit_remove(const struct scheduler *ops, struct sched_unit *unit)
{
struct rt_unit * const svc = rt_unit(unit);
* schedule function for rt scheduler.
* The lock is already grabbed in schedule.c, no need to lock here
*/
-static void
+static void cf_check
rt_schedule(const struct scheduler *ops, struct sched_unit *currunit,
s_time_t now, bool tasklet_work_scheduled)
{
* Remove UNIT from RunQ
* The lock is already grabbed in schedule.c, no need to lock here
*/
-static void
+static void cf_check
rt_unit_sleep(const struct scheduler *ops, struct sched_unit *unit)
{
struct rt_unit * const svc = rt_unit(unit);
* The lock is already grabbed in schedule.c, no need to lock here
* TODO: what if these two units belongs to the same domain?
*/
-static void
+static void cf_check
rt_unit_wake(const struct scheduler *ops, struct sched_unit *unit)
{
struct rt_unit * const svc = rt_unit(unit);
* scurr has finished context switch, insert it back to the RunQ,
* and then pick the highest priority unit from runq to run
*/
-static void
+static void cf_check
rt_context_saved(const struct scheduler *ops, struct sched_unit *unit)
{
struct rt_unit *svc = rt_unit(unit);
/*
* set/get each unit info of each domain
*/
-static int
+static int cf_check
rt_dom_cntl(
const struct scheduler *ops,
struct domain *d,