Skip to content

Commit

Permalink
sched: add cfs_rq ops
Browse files Browse the repository at this point in the history
add the set_task_cfs_rq() abstraction needed by CONFIG_FAIR_GROUP_SCHED.

(not activated yet)

Signed-off-by: Ingo Molnar <[email protected]>
  • Loading branch information
Ingo Molnar committed Jul 9, 2007
1 parent 41b86e9 commit 138a8ae
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,18 @@ static inline unsigned long long rq_clock(struct rq *rq)
#define task_rq(p) cpu_rq(task_cpu(p))
#define cpu_curr(cpu) (cpu_rq(cpu)->curr)

#ifdef CONFIG_FAIR_GROUP_SCHED
/* Change a task's ->cfs_rq if it moves across CPUs */
static inline void set_task_cfs_rq(struct task_struct *p)
{
p->se.cfs_rq = &task_rq(p)->cfs;
}
#else
static inline void set_task_cfs_rq(struct task_struct *p)
{
}
#endif

#ifndef prepare_arch_switch
# define prepare_arch_switch(next) do { } while (0)
#endif
Expand Down

0 comments on commit 138a8ae

Please sign in to comment.