diff options
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r-- | include/linux/sched.h | 31 |
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); | |||
137 | extern unsigned long nr_active(void); | 137 | extern unsigned long nr_active(void); |
138 | extern unsigned long nr_iowait(void); | 138 | extern unsigned long nr_iowait(void); |
139 | 139 | ||
140 | extern unsigned long get_parent_ip(unsigned long addr); | ||
141 | |||
140 | struct seq_file; | 142 | struct seq_file; |
141 | struct cfs_rq; | 143 | struct cfs_rq; |
142 | struct task_group; | 144 | struct task_group; |
@@ -331,7 +333,9 @@ extern signed long schedule_timeout(signed long timeout); | |||
331 | extern signed long schedule_timeout_interruptible(signed long timeout); | 333 | extern signed long schedule_timeout_interruptible(signed long timeout); |
332 | extern signed long schedule_timeout_killable(signed long timeout); | 334 | extern signed long schedule_timeout_killable(signed long timeout); |
333 | extern signed long schedule_timeout_uninterruptible(signed long timeout); | 335 | extern signed long schedule_timeout_uninterruptible(signed long timeout); |
336 | asmlinkage void __schedule(void); | ||
334 | asmlinkage void schedule(void); | 337 | asmlinkage void schedule(void); |
338 | extern int mutex_spin_on_owner(struct mutex *lock, struct thread_info *owner); | ||
335 | 339 | ||
336 | struct nsproxy; | 340 | struct nsproxy; |
337 | struct user_namespace; | 341 | struct 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 | ||
1684 | extern int sched_clock_stable; | ||
1685 | #endif | ||
1686 | |||
1673 | extern unsigned long long sched_clock(void); | 1687 | extern unsigned long long sched_clock(void); |
1674 | 1688 | ||
1675 | extern void sched_clock_init(void); | 1689 | extern void sched_clock_init(void); |
@@ -2087,6 +2101,19 @@ static inline int object_is_on_stack(void *obj) | |||
2087 | 2101 | ||
2088 | extern void thread_info_cache_init(void); | 2102 | extern void thread_info_cache_init(void); |
2089 | 2103 | ||
2104 | #ifdef CONFIG_DEBUG_STACK_USAGE | ||
2105 | static 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 | */ |