[Question] sched/rt_mutex: re-enqueue_task on rt_mutex_setprio()

From: Namhyung Kim
Date: Sat Jul 07 2012 - 01:49:21 EST


Hi,

I have a question on the code below:

void rt_mutex_setprio(struct task_struct *p, int prio)
{
...
if (on_rq)
enqueue_task(rq, p, oldprio < prio ? ENQUEUE_HEAD : 0);

When enqueueing @p with new @prio, it seems put @p at the head of a
rq if appropriate. I guess it's the case of boosting @p with higher
priority, right? So Should the conditional be a reverse form (provided
that less number means higher priority)? Please shed some light on me.

Thanks,
Namhyung

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/