Commit e3411d4c authored by Philippe Gerum's avatar Philippe Gerum Committed by Jan Kiszka
Browse files

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 4aa8dcc0
......@@ -293,8 +293,8 @@ static void xnsched_quota_protectprio(struct xnthread *thread, int prio)
thread->cprio = prio;
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;
......@@ -789,11 +789,11 @@ 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_protectprio = xnsched_quota_protectprio,
.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