]> err.no Git - linux-2.6/blobdiff - include/asm-x86_64/thread_info.h
Remove dead netfilter_logging.h from include/linux/Kbuild
[linux-2.6] / include / asm-x86_64 / thread_info.h
index b5e88216fd80da5c2915a8b5d3f23faaec54f4bb..2029b00351f3f6a1eb2e828bbb2a931d7910a1dd 100644 (file)
@@ -73,8 +73,21 @@ static inline struct thread_info *stack_thread_info(void)
 }
 
 /* thread information allocation */
+#ifdef CONFIG_DEBUG_STACK_USAGE
+#define alloc_thread_info(tsk)                                 \
+    ({                                                         \
+       struct thread_info *ret;                                \
+                                                               \
+       ret = ((struct thread_info *) __get_free_pages(GFP_KERNEL,THREAD_ORDER)); \
+       if (ret)                                                \
+               memset(ret, 0, THREAD_SIZE);                    \
+       ret;                                                    \
+    })
+#else
 #define alloc_thread_info(tsk) \
        ((struct thread_info *) __get_free_pages(GFP_KERNEL,THREAD_ORDER))
+#endif
+
 #define free_thread_info(ti) free_pages((unsigned long) (ti), THREAD_ORDER)
 
 #else /* !__ASSEMBLY__ */