aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sched.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r--include/linux/sched.h28
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 */
119extern unsigned long avenrun[]; /* Load averages */ 119extern unsigned long avenrun[]; /* Load averages */
120extern 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);
136extern int nr_processes(void); 137extern int nr_processes(void);
137extern unsigned long nr_running(void); 138extern unsigned long nr_running(void);
138extern unsigned long nr_uninterruptible(void); 139extern unsigned long nr_uninterruptible(void);
139extern unsigned long nr_active(void);
140extern unsigned long nr_iowait(void); 140extern unsigned long nr_iowait(void);
141extern void calc_global_load(void);
141 142
142extern unsigned long get_parent_ip(unsigned long addr); 143extern 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
845static inline struct cpumask *sched_group_cpus(struct sched_group *sg) 856static 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
932static inline struct cpumask *sched_domain_span(struct sched_domain *sd) 952static inline struct cpumask *sched_domain_span(struct sched_domain *sd)