]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/sched.h
Merge commit 'remotes/tip/x86/paravirt' into x86/untangle2
[linux-2.6-omap-h63xx.git] / include / linux / sched.h
index 2127e959e0f4ac86565ff0832063586ac6387dab..28b3f505f189a7e1f9809abf126b036130f5b5d3 100644 (file)
@@ -1161,10 +1161,9 @@ struct task_struct {
        pid_t pid;
        pid_t tgid;
 
-#ifdef CONFIG_CC_STACKPROTECTOR
        /* Canary value for the -fstack-protector gcc feature */
        unsigned long stack_canary;
-#endif
+
        /* 
         * pointers to (original) parent process, youngest child, younger sibling,
         * older sibling, respectively.  (p->father can be replaced with 
@@ -2070,6 +2069,19 @@ static inline int object_is_on_stack(void *obj)
 
 extern void thread_info_cache_init(void);
 
+#ifdef CONFIG_DEBUG_STACK_USAGE
+static inline unsigned long stack_not_used(struct task_struct *p)
+{
+       unsigned long *n = end_of_stack(p);
+
+       do {    /* Skip over canary */
+               n++;
+       } while (!*n);
+
+       return (unsigned long)n - (unsigned long)end_of_stack(p);
+}
+#endif
+
 /* set thread flags in other task's structures
  * - see asm/thread_info.h for TIF_xxxx flags available
  */