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.h172
1 files changed, 92 insertions, 80 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index c5d3f847ca8d..5270d449ff9d 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -134,7 +134,6 @@ extern unsigned long nr_running(void);
134extern unsigned long nr_uninterruptible(void); 134extern unsigned long nr_uninterruptible(void);
135extern unsigned long nr_active(void); 135extern unsigned long nr_active(void);
136extern unsigned long nr_iowait(void); 136extern unsigned long nr_iowait(void);
137extern unsigned long weighted_cpuload(const int cpu);
138 137
139struct seq_file; 138struct seq_file;
140struct cfs_rq; 139struct cfs_rq;
@@ -246,6 +245,8 @@ extern asmlinkage void schedule_tail(struct task_struct *prev);
246extern void init_idle(struct task_struct *idle, int cpu); 245extern void init_idle(struct task_struct *idle, int cpu);
247extern void init_idle_bootup_task(struct task_struct *idle); 246extern void init_idle_bootup_task(struct task_struct *idle);
248 247
248extern int runqueue_is_locked(void);
249
249extern cpumask_t nohz_cpu_mask; 250extern cpumask_t nohz_cpu_mask;
250#if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ) 251#if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ)
251extern int select_nohz_load_balancer(int cpu); 252extern int select_nohz_load_balancer(int cpu);
@@ -291,13 +292,13 @@ extern void sched_show_task(struct task_struct *p);
291 292
292#ifdef CONFIG_DETECT_SOFTLOCKUP 293#ifdef CONFIG_DETECT_SOFTLOCKUP
293extern void softlockup_tick(void); 294extern void softlockup_tick(void);
294extern void spawn_softlockup_task(void);
295extern void touch_softlockup_watchdog(void); 295extern void touch_softlockup_watchdog(void);
296extern void touch_all_softlockup_watchdogs(void); 296extern void touch_all_softlockup_watchdogs(void);
297extern unsigned long softlockup_thresh; 297extern unsigned int softlockup_panic;
298extern unsigned long sysctl_hung_task_check_count; 298extern unsigned long sysctl_hung_task_check_count;
299extern unsigned long sysctl_hung_task_timeout_secs; 299extern unsigned long sysctl_hung_task_timeout_secs;
300extern unsigned long sysctl_hung_task_warnings; 300extern unsigned long sysctl_hung_task_warnings;
301extern int softlockup_thresh;
301#else 302#else
302static inline void softlockup_tick(void) 303static inline void softlockup_tick(void)
303{ 304{
@@ -504,6 +505,7 @@ struct signal_struct {
504 unsigned long nvcsw, nivcsw, cnvcsw, cnivcsw; 505 unsigned long nvcsw, nivcsw, cnvcsw, cnivcsw;
505 unsigned long min_flt, maj_flt, cmin_flt, cmaj_flt; 506 unsigned long min_flt, maj_flt, cmin_flt, cmaj_flt;
506 unsigned long inblock, oublock, cinblock, coublock; 507 unsigned long inblock, oublock, cinblock, coublock;
508 struct task_io_accounting ioac;
507 509
508 /* 510 /*
509 * Cumulative ns of scheduled CPU time for dead threads in the 511 * Cumulative ns of scheduled CPU time for dead threads in the
@@ -666,6 +668,10 @@ struct task_delay_info {
666 /* io operations performed */ 668 /* io operations performed */
667 u32 swapin_count; /* total count of the number of swapin block */ 669 u32 swapin_count; /* total count of the number of swapin block */
668 /* io operations performed */ 670 /* io operations performed */
671
672 struct timespec freepages_start, freepages_end;
673 u64 freepages_delay; /* wait for memory reclaim */
674 u32 freepages_count; /* total count of memory reclaim */
669}; 675};
670#endif /* CONFIG_TASK_DELAY_ACCT */ 676#endif /* CONFIG_TASK_DELAY_ACCT */
671 677
@@ -784,6 +790,8 @@ struct sched_domain {
784 unsigned int balance_interval; /* initialise to 1. units in ms. */ 790 unsigned int balance_interval; /* initialise to 1. units in ms. */
785 unsigned int nr_balance_failed; /* initialise to 0 */ 791 unsigned int nr_balance_failed; /* initialise to 0 */
786 792
793 u64 last_update;
794
787#ifdef CONFIG_SCHEDSTATS 795#ifdef CONFIG_SCHEDSTATS
788 /* load_balance() stats */ 796 /* load_balance() stats */
789 unsigned int lb_count[CPU_MAX_IDLE_TYPES]; 797 unsigned int lb_count[CPU_MAX_IDLE_TYPES];
@@ -821,24 +829,16 @@ extern void partition_sched_domains(int ndoms_new, cpumask_t *doms_new,
821 struct sched_domain_attr *dattr_new); 829 struct sched_domain_attr *dattr_new);
822extern int arch_reinit_sched_domains(void); 830extern int arch_reinit_sched_domains(void);
823 831
824#endif /* CONFIG_SMP */ 832#else /* CONFIG_SMP */
825 833
826/* 834struct sched_domain_attr;
827 * A runqueue laden with a single nice 0 task scores a weighted_cpuload of
828 * SCHED_LOAD_SCALE. This function returns 1 if any cpu is laden with a
829 * task of nice 0 or enough lower priority tasks to bring up the
830 * weighted_cpuload
831 */
832static inline int above_background_load(void)
833{
834 unsigned long cpu;
835 835
836 for_each_online_cpu(cpu) { 836static inline void
837 if (weighted_cpuload(cpu) >= SCHED_LOAD_SCALE) 837partition_sched_domains(int ndoms_new, cpumask_t *doms_new,
838 return 1; 838 struct sched_domain_attr *dattr_new)
839 } 839{
840 return 0;
841} 840}
841#endif /* !CONFIG_SMP */
842 842
843struct io_context; /* See blkdev.h */ 843struct io_context; /* See blkdev.h */
844#define NGROUPS_SMALL 32 844#define NGROUPS_SMALL 32
@@ -921,8 +921,8 @@ struct sched_class {
921 void (*set_cpus_allowed)(struct task_struct *p, 921 void (*set_cpus_allowed)(struct task_struct *p,
922 const cpumask_t *newmask); 922 const cpumask_t *newmask);
923 923
924 void (*join_domain)(struct rq *rq); 924 void (*rq_online)(struct rq *rq);
925 void (*leave_domain)(struct rq *rq); 925 void (*rq_offline)(struct rq *rq);
926 926
927 void (*switched_from) (struct rq *this_rq, struct task_struct *task, 927 void (*switched_from) (struct rq *this_rq, struct task_struct *task,
928 int running); 928 int running);
@@ -1039,6 +1039,7 @@ struct task_struct {
1039#endif 1039#endif
1040 1040
1041 int prio, static_prio, normal_prio; 1041 int prio, static_prio, normal_prio;
1042 unsigned int rt_priority;
1042 const struct sched_class *sched_class; 1043 const struct sched_class *sched_class;
1043 struct sched_entity se; 1044 struct sched_entity se;
1044 struct sched_rt_entity rt; 1045 struct sched_rt_entity rt;
@@ -1075,12 +1076,6 @@ struct task_struct {
1075#endif 1076#endif
1076 1077
1077 struct list_head tasks; 1078 struct list_head tasks;
1078 /*
1079 * ptrace_list/ptrace_children forms the list of my children
1080 * that were stolen by a ptracer.
1081 */
1082 struct list_head ptrace_children;
1083 struct list_head ptrace_list;
1084 1079
1085 struct mm_struct *mm, *active_mm; 1080 struct mm_struct *mm, *active_mm;
1086 1081
@@ -1102,18 +1097,25 @@ struct task_struct {
1102 /* 1097 /*
1103 * pointers to (original) parent process, youngest child, younger sibling, 1098 * pointers to (original) parent process, youngest child, younger sibling,
1104 * older sibling, respectively. (p->father can be replaced with 1099 * older sibling, respectively. (p->father can be replaced with
1105 * p->parent->pid) 1100 * p->real_parent->pid)
1106 */ 1101 */
1107 struct task_struct *real_parent; /* real parent process (when being debugged) */ 1102 struct task_struct *real_parent; /* real parent process */
1108 struct task_struct *parent; /* parent process */ 1103 struct task_struct *parent; /* recipient of SIGCHLD, wait4() reports */
1109 /* 1104 /*
1110 * children/sibling forms the list of my children plus the 1105 * children/sibling forms the list of my natural children
1111 * tasks I'm ptracing.
1112 */ 1106 */
1113 struct list_head children; /* list of my children */ 1107 struct list_head children; /* list of my children */
1114 struct list_head sibling; /* linkage in my parent's children list */ 1108 struct list_head sibling; /* linkage in my parent's children list */
1115 struct task_struct *group_leader; /* threadgroup leader */ 1109 struct task_struct *group_leader; /* threadgroup leader */
1116 1110
1111 /*
1112 * ptraced is the list of tasks this task is using ptrace on.
1113 * This includes both natural children and PTRACE_ATTACH targets.
1114 * p->ptrace_entry is p's link on the p->parent->ptraced list.
1115 */
1116 struct list_head ptraced;
1117 struct list_head ptrace_entry;
1118
1117 /* PID/PID hash table linkage. */ 1119 /* PID/PID hash table linkage. */
1118 struct pid_link pids[PIDTYPE_MAX]; 1120 struct pid_link pids[PIDTYPE_MAX];
1119 struct list_head thread_group; 1121 struct list_head thread_group;
@@ -1122,7 +1124,6 @@ struct task_struct {
1122 int __user *set_child_tid; /* CLONE_CHILD_SETTID */ 1124 int __user *set_child_tid; /* CLONE_CHILD_SETTID */
1123 int __user *clear_child_tid; /* CLONE_CHILD_CLEARTID */ 1125 int __user *clear_child_tid; /* CLONE_CHILD_CLEARTID */
1124 1126
1125 unsigned int rt_priority;
1126 cputime_t utime, stime, utimescaled, stimescaled; 1127 cputime_t utime, stime, utimescaled, stimescaled;
1127 cputime_t gtime; 1128 cputime_t gtime;
1128 cputime_t prev_utime, prev_stime; 1129 cputime_t prev_utime, prev_stime;
@@ -1141,12 +1142,12 @@ struct task_struct {
1141 gid_t gid,egid,sgid,fsgid; 1142 gid_t gid,egid,sgid,fsgid;
1142 struct group_info *group_info; 1143 struct group_info *group_info;
1143 kernel_cap_t cap_effective, cap_inheritable, cap_permitted, cap_bset; 1144 kernel_cap_t cap_effective, cap_inheritable, cap_permitted, cap_bset;
1144 unsigned securebits;
1145 struct user_struct *user; 1145 struct user_struct *user;
1146 unsigned securebits;
1146#ifdef CONFIG_KEYS 1147#ifdef CONFIG_KEYS
1148 unsigned char jit_keyring; /* default keyring to attach requested keys to */
1147 struct key *request_key_auth; /* assumed request_key authority */ 1149 struct key *request_key_auth; /* assumed request_key authority */
1148 struct key *thread_keyring; /* keyring private to this thread */ 1150 struct key *thread_keyring; /* keyring private to this thread */
1149 unsigned char jit_keyring; /* default keyring to attach requested keys to */
1150#endif 1151#endif
1151 char comm[TASK_COMM_LEN]; /* executable name excluding path 1152 char comm[TASK_COMM_LEN]; /* executable name excluding path
1152 - access with [gs]et_task_comm (which lock 1153 - access with [gs]et_task_comm (which lock
@@ -1233,8 +1234,8 @@ struct task_struct {
1233# define MAX_LOCK_DEPTH 48UL 1234# define MAX_LOCK_DEPTH 48UL
1234 u64 curr_chain_key; 1235 u64 curr_chain_key;
1235 int lockdep_depth; 1236 int lockdep_depth;
1236 struct held_lock held_locks[MAX_LOCK_DEPTH];
1237 unsigned int lockdep_recursion; 1237 unsigned int lockdep_recursion;
1238 struct held_lock held_locks[MAX_LOCK_DEPTH];
1238#endif 1239#endif
1239 1240
1240/* journalling filesystem info */ 1241/* journalling filesystem info */
@@ -1252,19 +1253,11 @@ struct task_struct {
1252 1253
1253 unsigned long ptrace_message; 1254 unsigned long ptrace_message;
1254 siginfo_t *last_siginfo; /* For ptrace use. */ 1255 siginfo_t *last_siginfo; /* For ptrace use. */
1255#ifdef CONFIG_TASK_XACCT
1256/* i/o counters(bytes read/written, #syscalls */
1257 u64 rchar, wchar, syscr, syscw;
1258#endif
1259 struct task_io_accounting ioac; 1256 struct task_io_accounting ioac;
1260#if defined(CONFIG_TASK_XACCT) 1257#if defined(CONFIG_TASK_XACCT)
1261 u64 acct_rss_mem1; /* accumulated rss usage */ 1258 u64 acct_rss_mem1; /* accumulated rss usage */
1262 u64 acct_vm_mem1; /* accumulated virtual memory usage */ 1259 u64 acct_vm_mem1; /* accumulated virtual memory usage */
1263 cputime_t acct_stimexpd;/* stime since last update */ 1260 cputime_t acct_timexpd; /* stime + utime since last update */
1264#endif
1265#ifdef CONFIG_NUMA
1266 struct mempolicy *mempolicy;
1267 short il_next;
1268#endif 1261#endif
1269#ifdef CONFIG_CPUSETS 1262#ifdef CONFIG_CPUSETS
1270 nodemask_t mems_allowed; 1263 nodemask_t mems_allowed;
@@ -1285,6 +1278,10 @@ struct task_struct {
1285 struct list_head pi_state_list; 1278 struct list_head pi_state_list;
1286 struct futex_pi_state *pi_state_cache; 1279 struct futex_pi_state *pi_state_cache;
1287#endif 1280#endif
1281#ifdef CONFIG_NUMA
1282 struct mempolicy *mempolicy;
1283 short il_next;
1284#endif
1288 atomic_t fs_excl; /* holding fs exclusive resources */ 1285 atomic_t fs_excl; /* holding fs exclusive resources */
1289 struct rcu_head rcu; 1286 struct rcu_head rcu;
1290 1287
@@ -1499,14 +1496,16 @@ static inline void put_task_struct(struct task_struct *t)
1499#define PF_KSWAPD 0x00040000 /* I am kswapd */ 1496#define PF_KSWAPD 0x00040000 /* I am kswapd */
1500#define PF_SWAPOFF 0x00080000 /* I am in swapoff */ 1497#define PF_SWAPOFF 0x00080000 /* I am in swapoff */
1501#define PF_LESS_THROTTLE 0x00100000 /* Throttle me less: I clean memory */ 1498#define PF_LESS_THROTTLE 0x00100000 /* Throttle me less: I clean memory */
1502#define PF_BORROWED_MM 0x00200000 /* I am a kthread doing use_mm */ 1499#define PF_KTHREAD 0x00200000 /* I am a kernel thread */
1503#define PF_RANDOMIZE 0x00400000 /* randomize virtual address space */ 1500#define PF_RANDOMIZE 0x00400000 /* randomize virtual address space */
1504#define PF_SWAPWRITE 0x00800000 /* Allowed to write to swap */ 1501#define PF_SWAPWRITE 0x00800000 /* Allowed to write to swap */
1505#define PF_SPREAD_PAGE 0x01000000 /* Spread page cache over cpuset */ 1502#define PF_SPREAD_PAGE 0x01000000 /* Spread page cache over cpuset */
1506#define PF_SPREAD_SLAB 0x02000000 /* Spread some slab caches over cpuset */ 1503#define PF_SPREAD_SLAB 0x02000000 /* Spread some slab caches over cpuset */
1504#define PF_THREAD_BOUND 0x04000000 /* Thread bound to specific cpu */
1507#define PF_MEMPOLICY 0x10000000 /* Non-default NUMA mempolicy */ 1505#define PF_MEMPOLICY 0x10000000 /* Non-default NUMA mempolicy */
1508#define PF_MUTEX_TESTER 0x20000000 /* Thread belongs to the rt mutex tester */ 1506#define PF_MUTEX_TESTER 0x20000000 /* Thread belongs to the rt mutex tester */
1509#define PF_FREEZER_SKIP 0x40000000 /* Freezer should not count it as freezeable */ 1507#define PF_FREEZER_SKIP 0x40000000 /* Freezer should not count it as freezeable */
1508#define PF_FREEZER_NOSIG 0x80000000 /* Freezer won't send signals to it */
1510 1509
1511/* 1510/*
1512 * Only the _current_ task can read/write to tsk->flags, but other 1511 * Only the _current_ task can read/write to tsk->flags, but other
@@ -1573,13 +1572,28 @@ static inline void sched_clock_idle_sleep_event(void)
1573static inline void sched_clock_idle_wakeup_event(u64 delta_ns) 1572static inline void sched_clock_idle_wakeup_event(u64 delta_ns)
1574{ 1573{
1575} 1574}
1576#else 1575
1576#ifdef CONFIG_NO_HZ
1577static inline void sched_clock_tick_stop(int cpu)
1578{
1579}
1580
1581static inline void sched_clock_tick_start(int cpu)
1582{
1583}
1584#endif
1585
1586#else /* CONFIG_HAVE_UNSTABLE_SCHED_CLOCK */
1577extern void sched_clock_init(void); 1587extern void sched_clock_init(void);
1578extern u64 sched_clock_cpu(int cpu); 1588extern u64 sched_clock_cpu(int cpu);
1579extern void sched_clock_tick(void); 1589extern void sched_clock_tick(void);
1580extern void sched_clock_idle_sleep_event(void); 1590extern void sched_clock_idle_sleep_event(void);
1581extern void sched_clock_idle_wakeup_event(u64 delta_ns); 1591extern void sched_clock_idle_wakeup_event(u64 delta_ns);
1592#ifdef CONFIG_NO_HZ
1593extern void sched_clock_tick_stop(int cpu);
1594extern void sched_clock_tick_start(int cpu);
1582#endif 1595#endif
1596#endif /* CONFIG_HAVE_UNSTABLE_SCHED_CLOCK */
1583 1597
1584/* 1598/*
1585 * For kernel-internal use: high-speed (but slightly incorrect) per-cpu 1599 * For kernel-internal use: high-speed (but slightly incorrect) per-cpu
@@ -1622,6 +1636,7 @@ extern unsigned int sysctl_sched_child_runs_first;
1622extern unsigned int sysctl_sched_features; 1636extern unsigned int sysctl_sched_features;
1623extern unsigned int sysctl_sched_migration_cost; 1637extern unsigned int sysctl_sched_migration_cost;
1624extern unsigned int sysctl_sched_nr_migrate; 1638extern unsigned int sysctl_sched_nr_migrate;
1639extern unsigned int sysctl_sched_shares_ratelimit;
1625 1640
1626int sched_nr_latency_handler(struct ctl_table *table, int write, 1641int sched_nr_latency_handler(struct ctl_table *table, int write,
1627 struct file *file, void __user *buffer, size_t *length, 1642 struct file *file, void __user *buffer, size_t *length,
@@ -1655,6 +1670,8 @@ extern int can_nice(const struct task_struct *p, const int nice);
1655extern int task_curr(const struct task_struct *p); 1670extern int task_curr(const struct task_struct *p);
1656extern int idle_cpu(int cpu); 1671extern int idle_cpu(int cpu);
1657extern int sched_setscheduler(struct task_struct *, int, struct sched_param *); 1672extern int sched_setscheduler(struct task_struct *, int, struct sched_param *);
1673extern int sched_setscheduler_nocheck(struct task_struct *, int,
1674 struct sched_param *);
1658extern struct task_struct *idle_task(int cpu); 1675extern struct task_struct *idle_task(int cpu);
1659extern struct task_struct *curr_task(int cpu); 1676extern struct task_struct *curr_task(int cpu);
1660extern void set_curr_task(int cpu, struct task_struct *p); 1677extern void set_curr_task(int cpu, struct task_struct *p);
@@ -1698,19 +1715,13 @@ extern struct pid_namespace init_pid_ns;
1698 * finds a task by its pid in the specified namespace 1715 * finds a task by its pid in the specified namespace
1699 * find_task_by_vpid(): 1716 * find_task_by_vpid():
1700 * finds a task by its virtual pid 1717 * finds a task by its virtual pid
1701 * find_task_by_pid():
1702 * finds a task by its global pid
1703 * 1718 *
1704 * see also find_pid() etc in include/linux/pid.h 1719 * see also find_vpid() etc in include/linux/pid.h
1705 */ 1720 */
1706 1721
1707extern struct task_struct *find_task_by_pid_type_ns(int type, int pid, 1722extern struct task_struct *find_task_by_pid_type_ns(int type, int pid,
1708 struct pid_namespace *ns); 1723 struct pid_namespace *ns);
1709 1724
1710static inline struct task_struct *__deprecated find_task_by_pid(pid_t nr)
1711{
1712 return find_task_by_pid_type_ns(PIDTYPE_PID, nr, &init_pid_ns);
1713}
1714extern struct task_struct *find_task_by_vpid(pid_t nr); 1725extern struct task_struct *find_task_by_vpid(pid_t nr);
1715extern struct task_struct *find_task_by_pid_ns(pid_t nr, 1726extern struct task_struct *find_task_by_pid_ns(pid_t nr,
1716 struct pid_namespace *ns); 1727 struct pid_namespace *ns);
@@ -1778,12 +1789,11 @@ extern int kill_pid_info_as_uid(int, struct siginfo *, struct pid *, uid_t, uid_
1778extern int kill_pgrp(struct pid *pid, int sig, int priv); 1789extern int kill_pgrp(struct pid *pid, int sig, int priv);
1779extern int kill_pid(struct pid *pid, int sig, int priv); 1790extern int kill_pid(struct pid *pid, int sig, int priv);
1780extern int kill_proc_info(int, struct siginfo *, pid_t); 1791extern int kill_proc_info(int, struct siginfo *, pid_t);
1781extern void do_notify_parent(struct task_struct *, int); 1792extern int do_notify_parent(struct task_struct *, int);
1782extern void force_sig(int, struct task_struct *); 1793extern void force_sig(int, struct task_struct *);
1783extern void force_sig_specific(int, struct task_struct *); 1794extern void force_sig_specific(int, struct task_struct *);
1784extern int send_sig(int, struct task_struct *, int); 1795extern int send_sig(int, struct task_struct *, int);
1785extern void zap_other_threads(struct task_struct *p); 1796extern void zap_other_threads(struct task_struct *p);
1786extern int kill_proc(pid_t, int, int);
1787extern struct sigqueue *sigqueue_alloc(void); 1797extern struct sigqueue *sigqueue_alloc(void);
1788extern void sigqueue_free(struct sigqueue *); 1798extern void sigqueue_free(struct sigqueue *);
1789extern int send_sigqueue(struct sigqueue *, struct task_struct *, int group); 1799extern int send_sigqueue(struct sigqueue *, struct task_struct *, int group);
@@ -1865,14 +1875,15 @@ extern void set_task_comm(struct task_struct *tsk, char *from);
1865extern char *get_task_comm(char *to, struct task_struct *tsk); 1875extern char *get_task_comm(char *to, struct task_struct *tsk);
1866 1876
1867#ifdef CONFIG_SMP 1877#ifdef CONFIG_SMP
1868extern void wait_task_inactive(struct task_struct * p); 1878extern unsigned long wait_task_inactive(struct task_struct *, long match_state);
1869#else 1879#else
1870#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}
1871#endif 1885#endif
1872 1886
1873#define remove_parent(p) list_del_init(&(p)->sibling)
1874#define add_parent(p) list_add_tail(&(p)->sibling,&(p)->parent->children)
1875
1876#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)
1877 1888
1878#define for_each_process(p) \ 1889#define for_each_process(p) \
@@ -1969,6 +1980,13 @@ static inline unsigned long *end_of_stack(struct task_struct *p)
1969 1980
1970#endif 1981#endif
1971 1982
1983static inline int object_is_on_stack(void *obj)
1984{
1985 void *stack = task_stack_page(current);
1986
1987 return (obj >= stack) && (obj < (stack + THREAD_SIZE));
1988}
1989
1972extern void thread_info_cache_init(void); 1990extern void thread_info_cache_init(void);
1973 1991
1974/* set thread flags in other task's structures 1992/* set thread flags in other task's structures
@@ -2033,9 +2051,6 @@ static inline int signal_pending_state(long state, struct task_struct *p)
2033 if (!signal_pending(p)) 2051 if (!signal_pending(p))
2034 return 0; 2052 return 0;
2035 2053
2036 if (state & (__TASK_STOPPED | __TASK_TRACED))
2037 return 0;
2038
2039 return (state & TASK_INTERRUPTIBLE) || __fatal_signal_pending(p); 2054 return (state & TASK_INTERRUPTIBLE) || __fatal_signal_pending(p);
2040} 2055}
2041 2056
@@ -2120,14 +2135,17 @@ static inline void set_task_cpu(struct task_struct *p, unsigned int cpu)
2120 2135
2121#endif /* CONFIG_SMP */ 2136#endif /* CONFIG_SMP */
2122 2137
2123#ifdef HAVE_ARCH_PICK_MMAP_LAYOUT
2124extern void arch_pick_mmap_layout(struct mm_struct *mm); 2138extern void arch_pick_mmap_layout(struct mm_struct *mm);
2139
2140#ifdef CONFIG_TRACING
2141extern void
2142__trace_special(void *__tr, void *__data,
2143 unsigned long arg1, unsigned long arg2, unsigned long arg3);
2125#else 2144#else
2126static inline void arch_pick_mmap_layout(struct mm_struct *mm) 2145static inline void
2146__trace_special(void *__tr, void *__data,
2147 unsigned long arg1, unsigned long arg2, unsigned long arg3)
2127{ 2148{
2128 mm->mmap_base = TASK_UNMAPPED_BASE;
2129 mm->get_unmapped_area = arch_get_unmapped_area;
2130 mm->unmap_area = arch_unmap_area;
2131} 2149}
2132#endif 2150#endif
2133 2151
@@ -2165,22 +2183,22 @@ extern long sched_group_rt_period(struct task_group *tg);
2165#ifdef CONFIG_TASK_XACCT 2183#ifdef CONFIG_TASK_XACCT
2166static inline void add_rchar(struct task_struct *tsk, ssize_t amt) 2184static inline void add_rchar(struct task_struct *tsk, ssize_t amt)
2167{ 2185{
2168 tsk->rchar += amt; 2186 tsk->ioac.rchar += amt;
2169} 2187}
2170 2188
2171static inline void add_wchar(struct task_struct *tsk, ssize_t amt) 2189static inline void add_wchar(struct task_struct *tsk, ssize_t amt)
2172{ 2190{
2173 tsk->wchar += amt; 2191 tsk->ioac.wchar += amt;
2174} 2192}
2175 2193
2176static inline void inc_syscr(struct task_struct *tsk) 2194static inline void inc_syscr(struct task_struct *tsk)
2177{ 2195{
2178 tsk->syscr++; 2196 tsk->ioac.syscr++;
2179} 2197}
2180 2198
2181static inline void inc_syscw(struct task_struct *tsk) 2199static inline void inc_syscw(struct task_struct *tsk)
2182{ 2200{
2183 tsk->syscw++; 2201 tsk->ioac.syscw++;
2184} 2202}
2185#else 2203#else
2186static inline void add_rchar(struct task_struct *tsk, ssize_t amt) 2204static inline void add_rchar(struct task_struct *tsk, ssize_t amt)
@@ -2200,14 +2218,6 @@ static inline void inc_syscw(struct task_struct *tsk)
2200} 2218}
2201#endif 2219#endif
2202 2220
2203#ifdef CONFIG_SMP
2204void migration_init(void);
2205#else
2206static inline void migration_init(void)
2207{
2208}
2209#endif
2210
2211#ifndef TASK_SIZE_OF 2221#ifndef TASK_SIZE_OF
2212#define TASK_SIZE_OF(tsk) TASK_SIZE 2222#define TASK_SIZE_OF(tsk) TASK_SIZE
2213#endif 2223#endif
@@ -2225,6 +2235,8 @@ static inline void mm_init_owner(struct mm_struct *mm, struct task_struct *p)
2225} 2235}
2226#endif /* CONFIG_MM_OWNER */ 2236#endif /* CONFIG_MM_OWNER */
2227 2237
2238#define TASK_STATE_TO_CHAR_STR "RSDTtZX"
2239
2228#endif /* __KERNEL__ */ 2240#endif /* __KERNEL__ */
2229 2241
2230#endif 2242#endif