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.h31
1 files changed, 29 insertions, 2 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 8c216e057c94..5b9424eaa58f 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -137,6 +137,8 @@ extern unsigned long nr_uninterruptible(void);
137extern unsigned long nr_active(void); 137extern unsigned long nr_active(void);
138extern unsigned long nr_iowait(void); 138extern unsigned long nr_iowait(void);
139 139
140extern unsigned long get_parent_ip(unsigned long addr);
141
140struct seq_file; 142struct seq_file;
141struct cfs_rq; 143struct cfs_rq;
142struct task_group; 144struct task_group;
@@ -331,7 +333,9 @@ extern signed long schedule_timeout(signed long timeout);
331extern signed long schedule_timeout_interruptible(signed long timeout); 333extern signed long schedule_timeout_interruptible(signed long timeout);
332extern signed long schedule_timeout_killable(signed long timeout); 334extern signed long schedule_timeout_killable(signed long timeout);
333extern signed long schedule_timeout_uninterruptible(signed long timeout); 335extern signed long schedule_timeout_uninterruptible(signed long timeout);
336asmlinkage void __schedule(void);
334asmlinkage void schedule(void); 337asmlinkage void schedule(void);
338extern int mutex_spin_on_owner(struct mutex *lock, struct thread_info *owner);
335 339
336struct nsproxy; 340struct nsproxy;
337struct user_namespace; 341struct user_namespace;
@@ -1178,10 +1182,9 @@ struct task_struct {
1178 pid_t pid; 1182 pid_t pid;
1179 pid_t tgid; 1183 pid_t tgid;
1180 1184
1181#ifdef CONFIG_CC_STACKPROTECTOR
1182 /* Canary value for the -fstack-protector gcc feature */ 1185 /* Canary value for the -fstack-protector gcc feature */
1183 unsigned long stack_canary; 1186 unsigned long stack_canary;
1184#endif 1187
1185 /* 1188 /*
1186 * pointers to (original) parent process, youngest child, younger sibling, 1189 * pointers to (original) parent process, youngest child, younger sibling,
1187 * older sibling, respectively. (p->father can be replaced with 1190 * older sibling, respectively. (p->father can be replaced with
@@ -1328,6 +1331,7 @@ struct task_struct {
1328 int lockdep_depth; 1331 int lockdep_depth;
1329 unsigned int lockdep_recursion; 1332 unsigned int lockdep_recursion;
1330 struct held_lock held_locks[MAX_LOCK_DEPTH]; 1333 struct held_lock held_locks[MAX_LOCK_DEPTH];
1334 gfp_t lockdep_reclaim_gfp;
1331#endif 1335#endif
1332 1336
1333/* journalling filesystem info */ 1337/* journalling filesystem info */
@@ -1670,6 +1674,16 @@ static inline int set_cpus_allowed(struct task_struct *p, cpumask_t new_mask)
1670 return set_cpus_allowed_ptr(p, &new_mask); 1674 return set_cpus_allowed_ptr(p, &new_mask);
1671} 1675}
1672 1676
1677/*
1678 * Architectures can set this to 1 if they have specified
1679 * CONFIG_HAVE_UNSTABLE_SCHED_CLOCK in their arch Kconfig,
1680 * but then during bootup it turns out that sched_clock()
1681 * is reliable after all:
1682 */
1683#ifdef CONFIG_HAVE_UNSTABLE_SCHED_CLOCK
1684extern int sched_clock_stable;
1685#endif
1686
1673extern unsigned long long sched_clock(void); 1687extern unsigned long long sched_clock(void);
1674 1688
1675extern void sched_clock_init(void); 1689extern void sched_clock_init(void);
@@ -2087,6 +2101,19 @@ static inline int object_is_on_stack(void *obj)
2087 2101
2088extern void thread_info_cache_init(void); 2102extern void thread_info_cache_init(void);
2089 2103
2104#ifdef CONFIG_DEBUG_STACK_USAGE
2105static inline unsigned long stack_not_used(struct task_struct *p)
2106{
2107 unsigned long *n = end_of_stack(p);
2108
2109 do { /* Skip over canary */
2110 n++;
2111 } while (!*n);
2112
2113 return (unsigned long)n - (unsigned long)end_of_stack(p);
2114}
2115#endif
2116
2090/* set thread flags in other task's structures 2117/* set thread flags in other task's structures
2091 * - see asm/thread_info.h for TIF_xxxx flags available 2118 * - see asm/thread_info.h for TIF_xxxx flags available
2092 */ 2119 */