diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2009-03-23 09:50:03 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2009-03-23 16:20:20 -0400 |
commit | 80c5520811d3805adcb15c570ea5e2d489fa5d0b (patch) | |
tree | ae797a7f4af39f80e77526533d06ac23b439f0ab /include/linux/sched.h | |
parent | b3e3b302cf6dc8d60b67f0e84d1fa5648889c038 (diff) | |
parent | 8c083f081d0014057901c68a0a3e0f8ca7ac8d23 (diff) |
Merge branch 'cpus4096' into irq/threaded
Conflicts:
arch/parisc/kernel/irq.c
kernel/irq/handle.c
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r-- | include/linux/sched.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index 011db2f4c94c..46d680643f89 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -1178,10 +1178,9 @@ struct task_struct { | |||
1178 | pid_t pid; | 1178 | pid_t pid; |
1179 | pid_t tgid; | 1179 | pid_t tgid; |
1180 | 1180 | ||
1181 | #ifdef CONFIG_CC_STACKPROTECTOR | ||
1182 | /* Canary value for the -fstack-protector gcc feature */ | 1181 | /* Canary value for the -fstack-protector gcc feature */ |
1183 | unsigned long stack_canary; | 1182 | unsigned long stack_canary; |
1184 | #endif | 1183 | |
1185 | /* | 1184 | /* |
1186 | * pointers to (original) parent process, youngest child, younger sibling, | 1185 | * pointers to (original) parent process, youngest child, younger sibling, |
1187 | * older sibling, respectively. (p->father can be replaced with | 1186 | * older sibling, respectively. (p->father can be replaced with |
@@ -2090,6 +2089,19 @@ static inline int object_is_on_stack(void *obj) | |||
2090 | 2089 | ||
2091 | extern void thread_info_cache_init(void); | 2090 | extern void thread_info_cache_init(void); |
2092 | 2091 | ||
2092 | #ifdef CONFIG_DEBUG_STACK_USAGE | ||
2093 | static inline unsigned long stack_not_used(struct task_struct *p) | ||
2094 | { | ||
2095 | unsigned long *n = end_of_stack(p); | ||
2096 | |||
2097 | do { /* Skip over canary */ | ||
2098 | n++; | ||
2099 | } while (!*n); | ||
2100 | |||
2101 | return (unsigned long)n - (unsigned long)end_of_stack(p); | ||
2102 | } | ||
2103 | #endif | ||
2104 | |||
2093 | /* set thread flags in other task's structures | 2105 | /* set thread flags in other task's structures |
2094 | * - see asm/thread_info.h for TIF_xxxx flags available | 2106 | * - see asm/thread_info.h for TIF_xxxx flags available |
2095 | */ | 2107 | */ |