aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sched.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-03-06 10:44:14 -0500
committerIngo Molnar <mingo@elte.hu>2009-03-06 10:45:01 -0500
commitf0ef03985130287c6c84ebe69416cf790e6cc00e (patch)
tree3ecb04cc4d82e5fc3ae5f1747e6da172ae8cbcb7 /include/linux/sched.h
parent16097439703bcd38e9fe5608c12add6dacb825ea (diff)
parent31bbed527e7039203920c51c9fb48c27aed0820c (diff)
Merge branch 'x86/core' into tracing/textedit
Conflicts: arch/x86/Kconfig block/blktrace.c kernel/irq/handle.c Semantic conflict: kernel/trace/blktrace.c Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r--include/linux/sched.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 0237d124089f..5b9424eaa58f 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1182,10 +1182,9 @@ struct task_struct {
1182 pid_t pid; 1182 pid_t pid;
1183 pid_t tgid; 1183 pid_t tgid;
1184 1184
1185#ifdef CONFIG_CC_STACKPROTECTOR
1186 /* Canary value for the -fstack-protector gcc feature */ 1185 /* Canary value for the -fstack-protector gcc feature */
1187 unsigned long stack_canary; 1186 unsigned long stack_canary;
1188#endif 1187
1189 /* 1188 /*
1190 * pointers to (original) parent process, youngest child, younger sibling, 1189 * pointers to (original) parent process, youngest child, younger sibling,
1191 * older sibling, respectively. (p->father can be replaced with 1190 * older sibling, respectively. (p->father can be replaced with
@@ -2102,6 +2101,19 @@ static inline int object_is_on_stack(void *obj)
2102 2101
2103extern void thread_info_cache_init(void); 2102extern void thread_info_cache_init(void);
2104 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
2105/* set thread flags in other task's structures 2117/* set thread flags in other task's structures
2106 * - see asm/thread_info.h for TIF_xxxx flags available 2118 * - see asm/thread_info.h for TIF_xxxx flags available
2107 */ 2119 */