diff options
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r-- | include/linux/sched.h | 75 |
1 files changed, 16 insertions, 59 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index 42036ffe6b00..cfb0d87b99fc 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -87,6 +87,7 @@ struct sched_param { | |||
87 | #include <linux/task_io_accounting.h> | 87 | #include <linux/task_io_accounting.h> |
88 | #include <linux/kobject.h> | 88 | #include <linux/kobject.h> |
89 | #include <linux/latencytop.h> | 89 | #include <linux/latencytop.h> |
90 | #include <linux/cred.h> | ||
90 | 91 | ||
91 | #include <asm/processor.h> | 92 | #include <asm/processor.h> |
92 | 93 | ||
@@ -292,7 +293,6 @@ extern void sched_show_task(struct task_struct *p); | |||
292 | 293 | ||
293 | #ifdef CONFIG_DETECT_SOFTLOCKUP | 294 | #ifdef CONFIG_DETECT_SOFTLOCKUP |
294 | extern void softlockup_tick(void); | 295 | extern void softlockup_tick(void); |
295 | extern void spawn_softlockup_task(void); | ||
296 | extern void touch_softlockup_watchdog(void); | 296 | extern void touch_softlockup_watchdog(void); |
297 | extern void touch_all_softlockup_watchdogs(void); | 297 | extern void touch_all_softlockup_watchdogs(void); |
298 | extern unsigned int softlockup_panic; | 298 | extern unsigned int softlockup_panic; |
@@ -506,9 +506,6 @@ struct signal_struct { | |||
506 | unsigned long nvcsw, nivcsw, cnvcsw, cnivcsw; | 506 | unsigned long nvcsw, nivcsw, cnvcsw, cnivcsw; |
507 | unsigned long min_flt, maj_flt, cmin_flt, cmaj_flt; | 507 | unsigned long min_flt, maj_flt, cmin_flt, cmaj_flt; |
508 | unsigned long inblock, oublock, cinblock, coublock; | 508 | unsigned long inblock, oublock, cinblock, coublock; |
509 | #ifdef CONFIG_TASK_XACCT | ||
510 | u64 rchar, wchar, syscr, syscw; | ||
511 | #endif | ||
512 | struct task_io_accounting ioac; | 509 | struct task_io_accounting ioac; |
513 | 510 | ||
514 | /* | 511 | /* |
@@ -1257,10 +1254,6 @@ struct task_struct { | |||
1257 | 1254 | ||
1258 | unsigned long ptrace_message; | 1255 | unsigned long ptrace_message; |
1259 | siginfo_t *last_siginfo; /* For ptrace use. */ | 1256 | siginfo_t *last_siginfo; /* For ptrace use. */ |
1260 | #ifdef CONFIG_TASK_XACCT | ||
1261 | /* i/o counters(bytes read/written, #syscalls */ | ||
1262 | u64 rchar, wchar, syscr, syscw; | ||
1263 | #endif | ||
1264 | struct task_io_accounting ioac; | 1257 | struct task_io_accounting ioac; |
1265 | #if defined(CONFIG_TASK_XACCT) | 1258 | #if defined(CONFIG_TASK_XACCT) |
1266 | u64 acct_rss_mem1; /* accumulated rss usage */ | 1259 | u64 acct_rss_mem1; /* accumulated rss usage */ |
@@ -1559,16 +1552,10 @@ static inline int set_cpus_allowed(struct task_struct *p, cpumask_t new_mask) | |||
1559 | 1552 | ||
1560 | extern unsigned long long sched_clock(void); | 1553 | extern unsigned long long sched_clock(void); |
1561 | 1554 | ||
1562 | #ifndef CONFIG_HAVE_UNSTABLE_SCHED_CLOCK | 1555 | extern void sched_clock_init(void); |
1563 | static inline void sched_clock_init(void) | 1556 | extern u64 sched_clock_cpu(int cpu); |
1564 | { | ||
1565 | } | ||
1566 | |||
1567 | static inline u64 sched_clock_cpu(int cpu) | ||
1568 | { | ||
1569 | return sched_clock(); | ||
1570 | } | ||
1571 | 1557 | ||
1558 | #ifndef CONFIG_HAVE_UNSTABLE_SCHED_CLOCK | ||
1572 | static inline void sched_clock_tick(void) | 1559 | static inline void sched_clock_tick(void) |
1573 | { | 1560 | { |
1574 | } | 1561 | } |
@@ -1580,28 +1567,11 @@ static inline void sched_clock_idle_sleep_event(void) | |||
1580 | static inline void sched_clock_idle_wakeup_event(u64 delta_ns) | 1567 | static inline void sched_clock_idle_wakeup_event(u64 delta_ns) |
1581 | { | 1568 | { |
1582 | } | 1569 | } |
1583 | 1570 | #else | |
1584 | #ifdef CONFIG_NO_HZ | ||
1585 | static inline void sched_clock_tick_stop(int cpu) | ||
1586 | { | ||
1587 | } | ||
1588 | |||
1589 | static inline void sched_clock_tick_start(int cpu) | ||
1590 | { | ||
1591 | } | ||
1592 | #endif | ||
1593 | |||
1594 | #else /* CONFIG_HAVE_UNSTABLE_SCHED_CLOCK */ | ||
1595 | extern void sched_clock_init(void); | ||
1596 | extern u64 sched_clock_cpu(int cpu); | ||
1597 | extern void sched_clock_tick(void); | 1571 | extern void sched_clock_tick(void); |
1598 | extern void sched_clock_idle_sleep_event(void); | 1572 | extern void sched_clock_idle_sleep_event(void); |
1599 | extern void sched_clock_idle_wakeup_event(u64 delta_ns); | 1573 | extern void sched_clock_idle_wakeup_event(u64 delta_ns); |
1600 | #ifdef CONFIG_NO_HZ | ||
1601 | extern void sched_clock_tick_stop(int cpu); | ||
1602 | extern void sched_clock_tick_start(int cpu); | ||
1603 | #endif | 1574 | #endif |
1604 | #endif /* CONFIG_HAVE_UNSTABLE_SCHED_CLOCK */ | ||
1605 | 1575 | ||
1606 | /* | 1576 | /* |
1607 | * For kernel-internal use: high-speed (but slightly incorrect) per-cpu | 1577 | * For kernel-internal use: high-speed (but slightly incorrect) per-cpu |
@@ -1797,7 +1767,7 @@ extern int kill_pid_info_as_uid(int, struct siginfo *, struct pid *, uid_t, uid_ | |||
1797 | extern int kill_pgrp(struct pid *pid, int sig, int priv); | 1767 | extern int kill_pgrp(struct pid *pid, int sig, int priv); |
1798 | extern int kill_pid(struct pid *pid, int sig, int priv); | 1768 | extern int kill_pid(struct pid *pid, int sig, int priv); |
1799 | extern int kill_proc_info(int, struct siginfo *, pid_t); | 1769 | extern int kill_proc_info(int, struct siginfo *, pid_t); |
1800 | extern void do_notify_parent(struct task_struct *, int); | 1770 | extern int do_notify_parent(struct task_struct *, int); |
1801 | extern void force_sig(int, struct task_struct *); | 1771 | extern void force_sig(int, struct task_struct *); |
1802 | extern void force_sig_specific(int, struct task_struct *); | 1772 | extern void force_sig_specific(int, struct task_struct *); |
1803 | extern int send_sig(int, struct task_struct *, int); | 1773 | extern int send_sig(int, struct task_struct *, int); |
@@ -1883,9 +1853,13 @@ extern void set_task_comm(struct task_struct *tsk, char *from); | |||
1883 | extern char *get_task_comm(char *to, struct task_struct *tsk); | 1853 | extern char *get_task_comm(char *to, struct task_struct *tsk); |
1884 | 1854 | ||
1885 | #ifdef CONFIG_SMP | 1855 | #ifdef CONFIG_SMP |
1886 | extern void wait_task_inactive(struct task_struct * p); | 1856 | extern unsigned long wait_task_inactive(struct task_struct *, long match_state); |
1887 | #else | 1857 | #else |
1888 | #define wait_task_inactive(p) do { } while (0) | 1858 | static inline unsigned long wait_task_inactive(struct task_struct *p, |
1859 | long match_state) | ||
1860 | { | ||
1861 | return 1; | ||
1862 | } | ||
1889 | #endif | 1863 | #endif |
1890 | 1864 | ||
1891 | #define next_task(p) list_entry(rcu_dereference((p)->tasks.next), struct task_struct, tasks) | 1865 | #define next_task(p) list_entry(rcu_dereference((p)->tasks.next), struct task_struct, tasks) |
@@ -2139,16 +2113,7 @@ static inline void set_task_cpu(struct task_struct *p, unsigned int cpu) | |||
2139 | 2113 | ||
2140 | #endif /* CONFIG_SMP */ | 2114 | #endif /* CONFIG_SMP */ |
2141 | 2115 | ||
2142 | #ifdef HAVE_ARCH_PICK_MMAP_LAYOUT | ||
2143 | extern void arch_pick_mmap_layout(struct mm_struct *mm); | 2116 | extern void arch_pick_mmap_layout(struct mm_struct *mm); |
2144 | #else | ||
2145 | static inline void arch_pick_mmap_layout(struct mm_struct *mm) | ||
2146 | { | ||
2147 | mm->mmap_base = TASK_UNMAPPED_BASE; | ||
2148 | mm->get_unmapped_area = arch_get_unmapped_area; | ||
2149 | mm->unmap_area = arch_unmap_area; | ||
2150 | } | ||
2151 | #endif | ||
2152 | 2117 | ||
2153 | #ifdef CONFIG_TRACING | 2118 | #ifdef CONFIG_TRACING |
2154 | extern void | 2119 | extern void |
@@ -2196,22 +2161,22 @@ extern long sched_group_rt_period(struct task_group *tg); | |||
2196 | #ifdef CONFIG_TASK_XACCT | 2161 | #ifdef CONFIG_TASK_XACCT |
2197 | static inline void add_rchar(struct task_struct *tsk, ssize_t amt) | 2162 | static inline void add_rchar(struct task_struct *tsk, ssize_t amt) |
2198 | { | 2163 | { |
2199 | tsk->rchar += amt; | 2164 | tsk->ioac.rchar += amt; |
2200 | } | 2165 | } |
2201 | 2166 | ||
2202 | static inline void add_wchar(struct task_struct *tsk, ssize_t amt) | 2167 | static inline void add_wchar(struct task_struct *tsk, ssize_t amt) |
2203 | { | 2168 | { |
2204 | tsk->wchar += amt; | 2169 | tsk->ioac.wchar += amt; |
2205 | } | 2170 | } |
2206 | 2171 | ||
2207 | static inline void inc_syscr(struct task_struct *tsk) | 2172 | static inline void inc_syscr(struct task_struct *tsk) |
2208 | { | 2173 | { |
2209 | tsk->syscr++; | 2174 | tsk->ioac.syscr++; |
2210 | } | 2175 | } |
2211 | 2176 | ||
2212 | static inline void inc_syscw(struct task_struct *tsk) | 2177 | static inline void inc_syscw(struct task_struct *tsk) |
2213 | { | 2178 | { |
2214 | tsk->syscw++; | 2179 | tsk->ioac.syscw++; |
2215 | } | 2180 | } |
2216 | #else | 2181 | #else |
2217 | static inline void add_rchar(struct task_struct *tsk, ssize_t amt) | 2182 | static inline void add_rchar(struct task_struct *tsk, ssize_t amt) |
@@ -2231,14 +2196,6 @@ static inline void inc_syscw(struct task_struct *tsk) | |||
2231 | } | 2196 | } |
2232 | #endif | 2197 | #endif |
2233 | 2198 | ||
2234 | #ifdef CONFIG_SMP | ||
2235 | void migration_init(void); | ||
2236 | #else | ||
2237 | static inline void migration_init(void) | ||
2238 | { | ||
2239 | } | ||
2240 | #endif | ||
2241 | |||
2242 | #ifndef TASK_SIZE_OF | 2199 | #ifndef TASK_SIZE_OF |
2243 | #define TASK_SIZE_OF(tsk) TASK_SIZE | 2200 | #define TASK_SIZE_OF(tsk) TASK_SIZE |
2244 | #endif | 2201 | #endif |