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