aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sched.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-06-29 03:16:13 -0400
committerIngo Molnar <mingo@elte.hu>2009-06-29 03:16:25 -0400
commit348b346b238d9c0e5694c8d0b835a099cb383835 (patch)
tree967d9c72a1d6d33a408a1ff0d732296dbe8d3674 /include/linux/sched.h
parent6c697bdf08a09ce461e305a22362973036e95db3 (diff)
parent52989765629e7d182b4f146050ebba0abf2cb0b7 (diff)
Merge branch 'linus' into sched/core
Merge reason: we will merge a dependent patch. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r--include/linux/sched.h37
1 files changed, 24 insertions, 13 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index d4a2c6662f7d..5ba2c377bb5a 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -94,7 +94,6 @@ struct sched_param {
94 94
95#include <asm/processor.h> 95#include <asm/processor.h>
96 96
97struct mem_cgroup;
98struct exec_domain; 97struct exec_domain;
99struct futex_pi_state; 98struct futex_pi_state;
100struct robust_list_head; 99struct robust_list_head;
@@ -263,6 +262,7 @@ extern void task_rq_unlock_wait(struct task_struct *p);
263extern cpumask_var_t nohz_cpu_mask; 262extern cpumask_var_t nohz_cpu_mask;
264#if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ) 263#if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ)
265extern int select_nohz_load_balancer(int cpu); 264extern int select_nohz_load_balancer(int cpu);
265extern int get_nohz_load_balancer(void);
266#else 266#else
267static inline int select_nohz_load_balancer(int cpu) 267static inline int select_nohz_load_balancer(int cpu)
268{ 268{
@@ -675,7 +675,7 @@ struct user_struct {
675 struct task_group *tg; 675 struct task_group *tg;
676#ifdef CONFIG_SYSFS 676#ifdef CONFIG_SYSFS
677 struct kobject kobj; 677 struct kobject kobj;
678 struct work_struct work; 678 struct delayed_work work;
679#endif 679#endif
680#endif 680#endif
681 681
@@ -1179,7 +1179,6 @@ struct task_struct {
1179 * a short time 1179 * a short time
1180 */ 1180 */
1181 unsigned char fpu_counter; 1181 unsigned char fpu_counter;
1182 s8 oomkilladj; /* OOM kill score adjustment (bit shift). */
1183#ifdef CONFIG_BLK_DEV_IO_TRACE 1182#ifdef CONFIG_BLK_DEV_IO_TRACE
1184 unsigned int btrace_seq; 1183 unsigned int btrace_seq;
1185#endif 1184#endif
@@ -1323,7 +1322,8 @@ struct task_struct {
1323/* Thread group tracking */ 1322/* Thread group tracking */
1324 u32 parent_exec_id; 1323 u32 parent_exec_id;
1325 u32 self_exec_id; 1324 u32 self_exec_id;
1326/* Protection of (de-)allocation: mm, files, fs, tty, keyrings */ 1325/* Protection of (de-)allocation: mm, files, fs, tty, keyrings, mems_allowed,
1326 * mempolicy */
1327 spinlock_t alloc_lock; 1327 spinlock_t alloc_lock;
1328 1328
1329#ifdef CONFIG_GENERIC_HARDIRQS 1329#ifdef CONFIG_GENERIC_HARDIRQS
@@ -1391,8 +1391,7 @@ struct task_struct {
1391 cputime_t acct_timexpd; /* stime + utime since last update */ 1391 cputime_t acct_timexpd; /* stime + utime since last update */
1392#endif 1392#endif
1393#ifdef CONFIG_CPUSETS 1393#ifdef CONFIG_CPUSETS
1394 nodemask_t mems_allowed; 1394 nodemask_t mems_allowed; /* Protected by alloc_lock */
1395 int cpuset_mems_generation;
1396 int cpuset_mem_spread_rotor; 1395 int cpuset_mem_spread_rotor;
1397#endif 1396#endif
1398#ifdef CONFIG_CGROUPS 1397#ifdef CONFIG_CGROUPS
@@ -1415,7 +1414,7 @@ struct task_struct {
1415 struct list_head perf_counter_list; 1414 struct list_head perf_counter_list;
1416#endif 1415#endif
1417#ifdef CONFIG_NUMA 1416#ifdef CONFIG_NUMA
1418 struct mempolicy *mempolicy; 1417 struct mempolicy *mempolicy; /* Protected by alloc_lock */
1419 short il_next; 1418 short il_next;
1420#endif 1419#endif
1421 atomic_t fs_excl; /* holding fs exclusive resources */ 1420 atomic_t fs_excl; /* holding fs exclusive resources */
@@ -1802,11 +1801,23 @@ extern unsigned int sysctl_sched_child_runs_first;
1802extern unsigned int sysctl_sched_features; 1801extern unsigned int sysctl_sched_features;
1803extern unsigned int sysctl_sched_migration_cost; 1802extern unsigned int sysctl_sched_migration_cost;
1804extern unsigned int sysctl_sched_nr_migrate; 1803extern unsigned int sysctl_sched_nr_migrate;
1804extern unsigned int sysctl_timer_migration;
1805 1805
1806int sched_nr_latency_handler(struct ctl_table *table, int write, 1806int sched_nr_latency_handler(struct ctl_table *table, int write,
1807 struct file *file, void __user *buffer, size_t *length, 1807 struct file *file, void __user *buffer, size_t *length,
1808 loff_t *ppos); 1808 loff_t *ppos);
1809#endif 1809#endif
1810#ifdef CONFIG_SCHED_DEBUG
1811static inline unsigned int get_sysctl_timer_migration(void)
1812{
1813 return sysctl_timer_migration;
1814}
1815#else
1816static inline unsigned int get_sysctl_timer_migration(void)
1817{
1818 return 1;
1819}
1820#endif
1810extern unsigned int sysctl_sched_rt_period; 1821extern unsigned int sysctl_sched_rt_period;
1811extern int sysctl_sched_rt_runtime; 1822extern int sysctl_sched_rt_runtime;
1812 1823
@@ -1873,9 +1884,6 @@ extern struct pid_namespace init_pid_ns;
1873/* 1884/*
1874 * find a task by one of its numerical ids 1885 * find a task by one of its numerical ids
1875 * 1886 *
1876 * find_task_by_pid_type_ns():
1877 * it is the most generic call - it finds a task by all id,
1878 * type and namespace specified
1879 * find_task_by_pid_ns(): 1887 * find_task_by_pid_ns():
1880 * finds a task by its pid in the specified namespace 1888 * finds a task by its pid in the specified namespace
1881 * find_task_by_vpid(): 1889 * find_task_by_vpid():
@@ -1884,9 +1892,6 @@ extern struct pid_namespace init_pid_ns;
1884 * see also find_vpid() etc in include/linux/pid.h 1892 * see also find_vpid() etc in include/linux/pid.h
1885 */ 1893 */
1886 1894
1887extern struct task_struct *find_task_by_pid_type_ns(int type, int pid,
1888 struct pid_namespace *ns);
1889
1890extern struct task_struct *find_task_by_vpid(pid_t nr); 1895extern struct task_struct *find_task_by_vpid(pid_t nr);
1891extern struct task_struct *find_task_by_pid_ns(pid_t nr, 1896extern struct task_struct *find_task_by_pid_ns(pid_t nr,
1892 struct pid_namespace *ns); 1897 struct pid_namespace *ns);
@@ -2218,6 +2223,12 @@ static inline int test_tsk_need_resched(struct task_struct *tsk)
2218 return unlikely(test_tsk_thread_flag(tsk,TIF_NEED_RESCHED)); 2223 return unlikely(test_tsk_thread_flag(tsk,TIF_NEED_RESCHED));
2219} 2224}
2220 2225
2226static inline int restart_syscall(void)
2227{
2228 set_tsk_thread_flag(current, TIF_SIGPENDING);
2229 return -ERESTARTNOINTR;
2230}
2231
2221static inline int signal_pending(struct task_struct *p) 2232static inline int signal_pending(struct task_struct *p)
2222{ 2233{
2223 return unlikely(test_tsk_thread_flag(p,TIF_SIGPENDING)); 2234 return unlikely(test_tsk_thread_flag(p,TIF_SIGPENDING));