diff options
author | Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp> | 2009-06-29 01:44:57 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-06-29 03:19:27 -0400 |
commit | 54d35f29f49224d86b994acb6e5969b9ba09022d (patch) | |
tree | e50a3c51e4c38c6e726275ceeaee1d581cd04a89 /kernel/sched.c | |
parent | 348b346b238d9c0e5694c8d0b835a099cb383835 (diff) |
sched: Hide runqueues from direct reference at source code level for __raw_get_cpu_var()
Hide __raw_get_cpu_var() as well - thus all the direct
references to runqueues will abstracted out.
Signed-off-by: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
LKML-Reference: <20090629.144457.886429910353660979.mitake@dcl.info.waseda.ac.jp>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sched.c')
-rw-r--r-- | kernel/sched.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index 168b2680ae27..ebc5151f88c8 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -692,6 +692,7 @@ static inline int cpu_of(struct rq *rq) | |||
692 | #define this_rq() (&__get_cpu_var(runqueues)) | 692 | #define this_rq() (&__get_cpu_var(runqueues)) |
693 | #define task_rq(p) cpu_rq(task_cpu(p)) | 693 | #define task_rq(p) cpu_rq(task_cpu(p)) |
694 | #define cpu_curr(cpu) (cpu_rq(cpu)->curr) | 694 | #define cpu_curr(cpu) (cpu_rq(cpu)->curr) |
695 | #define raw_rq() (&__raw_get_cpu_var(runqueues)) | ||
695 | 696 | ||
696 | inline void update_rq_clock(struct rq *rq) | 697 | inline void update_rq_clock(struct rq *rq) |
697 | { | 698 | { |
@@ -6669,7 +6670,7 @@ EXPORT_SYMBOL(yield); | |||
6669 | */ | 6670 | */ |
6670 | void __sched io_schedule(void) | 6671 | void __sched io_schedule(void) |
6671 | { | 6672 | { |
6672 | struct rq *rq = &__raw_get_cpu_var(runqueues); | 6673 | struct rq *rq = raw_rq(); |
6673 | 6674 | ||
6674 | delayacct_blkio_start(); | 6675 | delayacct_blkio_start(); |
6675 | atomic_inc(&rq->nr_iowait); | 6676 | atomic_inc(&rq->nr_iowait); |
@@ -6681,7 +6682,7 @@ EXPORT_SYMBOL(io_schedule); | |||
6681 | 6682 | ||
6682 | long __sched io_schedule_timeout(long timeout) | 6683 | long __sched io_schedule_timeout(long timeout) |
6683 | { | 6684 | { |
6684 | struct rq *rq = &__raw_get_cpu_var(runqueues); | 6685 | struct rq *rq = raw_rq(); |
6685 | long ret; | 6686 | long ret; |
6686 | 6687 | ||
6687 | delayacct_blkio_start(); | 6688 | delayacct_blkio_start(); |