Commit de645ad1 authored by Philippe Gerum's avatar Philippe Gerum Committed by Jan Kiszka

cobalt/sched: quota: add early parameter checking handler

This is actually a plain conversion of the former sched_declare()
handler to the recently introduced sched_chkparam(), which solely
checks the parameter block.

By doing so, we ensure that those checks are done early and
unconditionally in xnsched_set_policy().
Signed-off-by: Philippe Gerum's avatarPhilippe Gerum <>
Signed-off-by: Jan Kiszka's avatarJan Kiszka <>
parent e71ee1c6
......@@ -282,8 +282,8 @@ static void xnsched_quota_trackprio(struct xnthread *thread,
thread->cprio = thread->bprio;
static int xnsched_quota_declare(struct xnthread *thread,
const union xnsched_policy_param *p)
static int xnsched_quota_chkparam(struct xnthread *thread,
const union xnsched_policy_param *p)
struct xnsched_quota_group *tg;
struct xnsched_quota *qs;
......@@ -778,10 +778,10 @@ struct xnsched_class xnsched_class_quota = {
.sched_tick = NULL,
.sched_rotate = NULL,
.sched_migrate = xnsched_quota_migrate,
.sched_chkparam = xnsched_quota_chkparam,
.sched_setparam = xnsched_quota_setparam,
.sched_getparam = xnsched_quota_getparam,
.sched_trackprio = xnsched_quota_trackprio,
.sched_declare = xnsched_quota_declare,
.sched_forget = xnsched_quota_forget,
.sched_kick = xnsched_quota_kick,
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment