if (queued)
enqueue_task(rq, p, ENQUEUE_RESTORE);
if (running)
- p->sched_class->set_curr_task(rq);
+ set_curr_task(rq, p);
}
/*
if (queued)
enqueue_task(rq, p, queue_flag);
if (running)
- p->sched_class->set_curr_task(rq);
+ set_curr_task(rq, p);
check_class_changed(rq, p, prev_class, oldprio);
out_unlock:
enqueue_task(rq, p, queue_flags);
}
if (running)
- p->sched_class->set_curr_task(rq);
+ set_curr_task(rq, p);
check_class_changed(rq, p, prev_class, oldprio);
preempt_disable(); /* avoid rq from going away on us */
if (queued)
enqueue_task(rq, p, ENQUEUE_RESTORE);
if (running)
- p->sched_class->set_curr_task(rq);
+ set_curr_task(rq, p);
task_rq_unlock(rq, p, &rf);
}
#endif /* CONFIG_NUMA_BALANCING */
if (queued)
enqueue_task(rq, tsk, ENQUEUE_RESTORE | ENQUEUE_MOVE);
if (unlikely(running))
- tsk->sched_class->set_curr_task(rq);
+ set_curr_task(rq, tsk);
task_rq_unlock(rq, tsk, &rf);
}
prev->sched_class->put_prev_task(rq, prev);
}
+static inline void set_curr_task(struct rq *rq, struct task_struct *curr)
+{
+ curr->sched_class->set_curr_task(rq);
+}
+
#define sched_class_highest (&stop_sched_class)
#define for_each_class(class) \
for (class = sched_class_highest; class; class = class->next)