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.h43
1 files changed, 11 insertions, 32 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 42036ffe6b00..5270d449ff9d 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -292,7 +292,6 @@ extern void sched_show_task(struct task_struct *p);
292 292
293#ifdef CONFIG_DETECT_SOFTLOCKUP 293#ifdef CONFIG_DETECT_SOFTLOCKUP
294extern void softlockup_tick(void); 294extern void softlockup_tick(void);
295extern void spawn_softlockup_task(void);
296extern void touch_softlockup_watchdog(void); 295extern void touch_softlockup_watchdog(void);
297extern void touch_all_softlockup_watchdogs(void); 296extern void touch_all_softlockup_watchdogs(void);
298extern unsigned int softlockup_panic; 297extern unsigned int softlockup_panic;
@@ -506,9 +505,6 @@ struct signal_struct {
506 unsigned long nvcsw, nivcsw, cnvcsw, cnivcsw; 505 unsigned long nvcsw, nivcsw, cnvcsw, cnivcsw;
507 unsigned long min_flt, maj_flt, cmin_flt, cmaj_flt; 506 unsigned long min_flt, maj_flt, cmin_flt, cmaj_flt;
508 unsigned long inblock, oublock, cinblock, coublock; 507 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; 508 struct task_io_accounting ioac;
513 509
514 /* 510 /*
@@ -1257,10 +1253,6 @@ struct task_struct {
1257 1253
1258 unsigned long ptrace_message; 1254 unsigned long ptrace_message;
1259 siginfo_t *last_siginfo; /* For ptrace use. */ 1255 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; 1256 struct task_io_accounting ioac;
1265#if defined(CONFIG_TASK_XACCT) 1257#if defined(CONFIG_TASK_XACCT)
1266 u64 acct_rss_mem1; /* accumulated rss usage */ 1258 u64 acct_rss_mem1; /* accumulated rss usage */
@@ -1797,7 +1789,7 @@ extern int kill_pid_info_as_uid(int, struct siginfo *, struct pid *, uid_t, uid_
1797extern int kill_pgrp(struct pid *pid, int sig, int priv); 1789extern int kill_pgrp(struct pid *pid, int sig, int priv);
1798extern int kill_pid(struct pid *pid, int sig, int priv); 1790extern int kill_pid(struct pid *pid, int sig, int priv);
1799extern int kill_proc_info(int, struct siginfo *, pid_t); 1791extern int kill_proc_info(int, struct siginfo *, pid_t);
1800extern void do_notify_parent(struct task_struct *, int); 1792extern int do_notify_parent(struct task_struct *, int);
1801extern void force_sig(int, struct task_struct *); 1793extern void force_sig(int, struct task_struct *);
1802extern void force_sig_specific(int, struct task_struct *); 1794extern void force_sig_specific(int, struct task_struct *);
1803extern int send_sig(int, struct task_struct *, int); 1795extern int send_sig(int, struct task_struct *, int);
@@ -1883,9 +1875,13 @@ extern void set_task_comm(struct task_struct *tsk, char *from);
1883extern char *get_task_comm(char *to, struct task_struct *tsk); 1875extern char *get_task_comm(char *to, struct task_struct *tsk);
1884 1876
1885#ifdef CONFIG_SMP 1877#ifdef CONFIG_SMP
1886extern void wait_task_inactive(struct task_struct * p); 1878extern unsigned long wait_task_inactive(struct task_struct *, long match_state);
1887#else 1879#else
1888#define wait_task_inactive(p) do { } while (0) 1880static inline unsigned long wait_task_inactive(struct task_struct *p,
1881 long match_state)
1882{
1883 return 1;
1884}
1889#endif 1885#endif
1890 1886
1891#define next_task(p) list_entry(rcu_dereference((p)->tasks.next), struct task_struct, tasks) 1887#define next_task(p) list_entry(rcu_dereference((p)->tasks.next), struct task_struct, tasks)
@@ -2139,16 +2135,7 @@ static inline void set_task_cpu(struct task_struct *p, unsigned int cpu)
2139 2135
2140#endif /* CONFIG_SMP */ 2136#endif /* CONFIG_SMP */
2141 2137
2142#ifdef HAVE_ARCH_PICK_MMAP_LAYOUT
2143extern void arch_pick_mmap_layout(struct mm_struct *mm); 2138extern void arch_pick_mmap_layout(struct mm_struct *mm);
2144#else
2145static 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 2139
2153#ifdef CONFIG_TRACING 2140#ifdef CONFIG_TRACING
2154extern void 2141extern void
@@ -2196,22 +2183,22 @@ extern long sched_group_rt_period(struct task_group *tg);
2196#ifdef CONFIG_TASK_XACCT 2183#ifdef CONFIG_TASK_XACCT
2197static inline void add_rchar(struct task_struct *tsk, ssize_t amt) 2184static inline void add_rchar(struct task_struct *tsk, ssize_t amt)
2198{ 2185{
2199 tsk->rchar += amt; 2186 tsk->ioac.rchar += amt;
2200} 2187}
2201 2188
2202static inline void add_wchar(struct task_struct *tsk, ssize_t amt) 2189static inline void add_wchar(struct task_struct *tsk, ssize_t amt)
2203{ 2190{
2204 tsk->wchar += amt; 2191 tsk->ioac.wchar += amt;
2205} 2192}
2206 2193
2207static inline void inc_syscr(struct task_struct *tsk) 2194static inline void inc_syscr(struct task_struct *tsk)
2208{ 2195{
2209 tsk->syscr++; 2196 tsk->ioac.syscr++;
2210} 2197}
2211 2198
2212static inline void inc_syscw(struct task_struct *tsk) 2199static inline void inc_syscw(struct task_struct *tsk)
2213{ 2200{
2214 tsk->syscw++; 2201 tsk->ioac.syscw++;
2215} 2202}
2216#else 2203#else
2217static inline void add_rchar(struct task_struct *tsk, ssize_t amt) 2204static inline void add_rchar(struct task_struct *tsk, ssize_t amt)
@@ -2231,14 +2218,6 @@ static inline void inc_syscw(struct task_struct *tsk)
2231} 2218}
2232#endif 2219#endif
2233 2220
2234#ifdef CONFIG_SMP
2235void migration_init(void);
2236#else
2237static inline void migration_init(void)
2238{
2239}
2240#endif
2241
2242#ifndef TASK_SIZE_OF 2221#ifndef TASK_SIZE_OF
2243#define TASK_SIZE_OF(tsk) TASK_SIZE 2222#define TASK_SIZE_OF(tsk) TASK_SIZE
2244#endif 2223#endif