lkml.org 
[lkml]   [2012]   [Jul]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[Question] sched/rt_mutex: re-enqueue_task on rt_mutex_setprio()
Date
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



\
 
 \ /
  Last update: 2012-07-07 08:21    [from the cache]
©2003-2011 Jasper Spaans