diff options
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r-- | include/linux/sched.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index dc7e592c473a..6aca4a16e377 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -1983,6 +1983,13 @@ static inline unsigned long *end_of_stack(struct task_struct *p) | |||
1983 | 1983 | ||
1984 | #endif | 1984 | #endif |
1985 | 1985 | ||
1986 | static inline int object_is_on_stack(void *obj) | ||
1987 | { | ||
1988 | void *stack = task_stack_page(current); | ||
1989 | |||
1990 | return (obj >= stack) && (obj < (stack + THREAD_SIZE)); | ||
1991 | } | ||
1992 | |||
1986 | extern void thread_info_cache_init(void); | 1993 | extern void thread_info_cache_init(void); |
1987 | 1994 | ||
1988 | /* set thread flags in other task's structures | 1995 | /* set thread flags in other task's structures |