diff options
author | Ingo Molnar <mingo@elte.hu> | 2007-07-09 12:51:58 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2007-07-09 12:51:58 -0400 |
commit | 138a8aeb5b9e5c5abd5e5ec22b6d1848e7e9c50b (patch) | |
tree | c109206cd95dd22c94dd24e27703a13bbbc80b0c | |
parent | 41b86e9c510ae66639bf29d3201e1d2384a7fde6 (diff) |
sched: add cfs_rq ops
add the set_task_cfs_rq() abstraction needed by CONFIG_FAIR_GROUP_SCHED.
(not activated yet)
Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r-- | kernel/sched.c | 12 |
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 */ | ||
454 | static inline void set_task_cfs_rq(struct task_struct *p) | ||
455 | { | ||
456 | p->se.cfs_rq = &task_rq(p)->cfs; | ||
457 | } | ||
458 | #else | ||
459 | static 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 |