more kernel hacking, the check_preempt_curr_rt() func
The following function in the linux kernel is a little confusing for me:
Code:
/*
* Preempt the current task with a newly woken task if needed:
*/
static void check_preempt_curr_rt(struct rq *rq, struct task_struct *p)
{
if (p->prio < rq->curr->prio) {
resched_task(rq->curr);
}
}
So this means that the current thread, rq->curr will be preempted when resched_task(rq->curr) is called, but this happens when p have a LOWER prio then rq->curr? shouldn't it be the other way around? I mean 99 is highets prioirty and 0 is the lowest. Or have I missunderstood this?
Also why is prio used and not rt_prioirty?