aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2008-11-24 11:05:04 -0500
committerIngo Molnar <mingo@elte.hu>2008-11-24 11:50:45 -0500
commit758b2cdc6f6a22c702bd8f2344382fb1270b2161 (patch)
tree270aec3d0f6235c1519c16e8dc8148f195e133db /include
parent1e5ce4f4a755ee498bd9217dae26143afa0d8f31 (diff)
sched: wrap sched_group and sched_domain cpumask accesses.
Impact: trivial wrap of member accesses This eases the transition in the next patch. We also get rid of a temporary cpumask in find_idlest_cpu() thanks to for_each_cpu_and, and sched_balance_self() due to getting weight before setting sd to NULL. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include')
-rw-r--r--include/linux/sched.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 4ce5c603c51a..2b95aa9f779b 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -786,6 +786,11 @@ struct sched_group {
786 u32 reciprocal_cpu_power; 786 u32 reciprocal_cpu_power;
787}; 787};
788 788
789static inline struct cpumask *sched_group_cpus(struct sched_group *sg)
790{
791 return &sg->cpumask;
792}
793
789enum sched_domain_level { 794enum sched_domain_level {
790 SD_LV_NONE = 0, 795 SD_LV_NONE = 0,
791 SD_LV_SIBLING, 796 SD_LV_SIBLING,
@@ -866,6 +871,11 @@ struct sched_domain {
866#endif 871#endif
867}; 872};
868 873
874static inline struct cpumask *sched_domain_span(struct sched_domain *sd)
875{
876 return &sd->span;
877}
878
869extern void partition_sched_domains(int ndoms_new, cpumask_t *doms_new, 879extern void partition_sched_domains(int ndoms_new, cpumask_t *doms_new,
870 struct sched_domain_attr *dattr_new); 880 struct sched_domain_attr *dattr_new);
871extern int arch_reinit_sched_domains(void); 881extern int arch_reinit_sched_domains(void);