diff options
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r-- | include/linux/sched.h | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index 886df41e7452..d4646ae300f0 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -117,6 +117,7 @@ struct fs_struct; | |||
117 | * 11 bit fractions. | 117 | * 11 bit fractions. |
118 | */ | 118 | */ |
119 | extern unsigned long avenrun[]; /* Load averages */ | 119 | extern unsigned long avenrun[]; /* Load averages */ |
120 | extern void get_avenrun(unsigned long *loads, unsigned long offset, int shift); | ||
120 | 121 | ||
121 | #define FSHIFT 11 /* nr of bits of precision */ | 122 | #define FSHIFT 11 /* nr of bits of precision */ |
122 | #define FIXED_1 (1<<FSHIFT) /* 1.0 as fixed-point */ | 123 | #define FIXED_1 (1<<FSHIFT) /* 1.0 as fixed-point */ |
@@ -136,8 +137,8 @@ DECLARE_PER_CPU(unsigned long, process_counts); | |||
136 | extern int nr_processes(void); | 137 | extern int nr_processes(void); |
137 | extern unsigned long nr_running(void); | 138 | extern unsigned long nr_running(void); |
138 | extern unsigned long nr_uninterruptible(void); | 139 | extern unsigned long nr_uninterruptible(void); |
139 | extern unsigned long nr_active(void); | ||
140 | extern unsigned long nr_iowait(void); | 140 | extern unsigned long nr_iowait(void); |
141 | extern void calc_global_load(void); | ||
141 | 142 | ||
142 | extern unsigned long get_parent_ip(unsigned long addr); | 143 | extern unsigned long get_parent_ip(unsigned long addr); |
143 | 144 | ||
@@ -839,7 +840,17 @@ struct sched_group { | |||
839 | */ | 840 | */ |
840 | u32 reciprocal_cpu_power; | 841 | u32 reciprocal_cpu_power; |
841 | 842 | ||
842 | unsigned long cpumask[]; | 843 | /* |
844 | * The CPUs this group covers. | ||
845 | * | ||
846 | * NOTE: this field is variable length. (Allocated dynamically | ||
847 | * by attaching extra space to the end of the structure, | ||
848 | * depending on how many CPUs the kernel has booted up with) | ||
849 | * | ||
850 | * It is also be embedded into static data structures at build | ||
851 | * time. (See 'struct static_sched_group' in kernel/sched.c) | ||
852 | */ | ||
853 | unsigned long cpumask[0]; | ||
843 | }; | 854 | }; |
844 | 855 | ||
845 | static inline struct cpumask *sched_group_cpus(struct sched_group *sg) | 856 | static inline struct cpumask *sched_group_cpus(struct sched_group *sg) |
@@ -925,8 +936,17 @@ struct sched_domain { | |||
925 | char *name; | 936 | char *name; |
926 | #endif | 937 | #endif |
927 | 938 | ||
928 | /* span of all CPUs in this domain */ | 939 | /* |
929 | unsigned long span[]; | 940 | * Span of all CPUs in this domain. |
941 | * | ||
942 | * NOTE: this field is variable length. (Allocated dynamically | ||
943 | * by attaching extra space to the end of the structure, | ||
944 | * depending on how many CPUs the kernel has booted up with) | ||
945 | * | ||
946 | * It is also be embedded into static data structures at build | ||
947 | * time. (See 'struct static_sched_domain' in kernel/sched.c) | ||
948 | */ | ||
949 | unsigned long span[0]; | ||
930 | }; | 950 | }; |
931 | 951 | ||
932 | static inline struct cpumask *sched_domain_span(struct sched_domain *sd) | 952 | static inline struct cpumask *sched_domain_span(struct sched_domain *sd) |