*/
static void activate_task(struct rq *rq, struct task_struct *p, int wakeup)
{
- update_rq_clock(rq);
-
if (p->state == TASK_UNINTERRUPTIBLE)
rq->nr_uninterruptible--;
out_activate:
#endif /* CONFIG_SMP */
+ update_rq_clock(rq);
activate_task(rq, p, 1);
/*
* Sync wakeups (i.e. those types of wakeups where the waker
update_rq_clock(src_rq);
deactivate_task(src_rq, p, 0);
set_task_cpu(p, this_cpu);
+ __update_rq_clock(this_rq);
activate_task(this_rq, p, 0);
/*
* Note that idle threads have a prio of MAX_PRIO, for this test
spin_unlock_irqrestore(&p->pi_lock, flags);
goto recheck;
}
+ update_rq_clock(rq);
on_rq = p->se.on_rq;
- if (on_rq) {
- update_rq_clock(rq);
+ if (on_rq)
deactivate_task(rq, p, 0);
- }
oldprio = p->prio;
__setscheduler(rq, p, policy, param->sched_priority);
if (on_rq) {
}
set_task_cpu(p, dest_cpu);
if (on_rq) {
+ update_rq_clock(rq_dest);
activate_task(rq_dest, p, 0);
check_preempt_curr(rq_dest, p);
}
goto out_unlock;
#endif
+ update_rq_clock(rq);
on_rq = p->se.on_rq;
- if (on_rq) {
- update_rq_clock(task_rq(p));
- deactivate_task(task_rq(p), p, 0);
- }
+ if (on_rq)
+ deactivate_task(rq, p, 0);
__setscheduler(rq, p, SCHED_NORMAL, 0);
if (on_rq) {
- activate_task(task_rq(p), p, 0);
+ activate_task(rq, p, 0);
resched_task(rq->curr);
}
#ifdef CONFIG_SMP