aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/sched.c')
-rw-r--r--kernel/sched.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index 0333abdda85e..d9ed9274bf0a 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -449,6 +449,18 @@ static inline unsigned long long rq_clock(struct rq *rq)
449#define task_rq(p) cpu_rq(task_cpu(p)) 449#define task_rq(p) cpu_rq(task_cpu(p))
450#define cpu_curr(cpu) (cpu_rq(cpu)->curr) 450#define cpu_curr(cpu) (cpu_rq(cpu)->curr)
451 451
452#ifdef CONFIG_FAIR_GROUP_SCHED
453/* Change a task's ->cfs_rq if it moves across CPUs */
454static inline void set_task_cfs_rq(struct task_struct *p)
455{
456 p->se.cfs_rq = &task_rq(p)->cfs;
457}
458#else
459static inline void set_task_cfs_rq(struct task_struct *p)
460{
461}
462#endif
463
452#ifndef prepare_arch_switch 464#ifndef prepare_arch_switch
453# define prepare_arch_switch(next) do { } while (0) 465# define prepare_arch_switch(next) do { } while (0)
454#endif 466#endif