diff options
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r-- | include/linux/sched.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index f8650314ba2f..e4681256e43e 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -1235,6 +1235,17 @@ static inline void task_unlock(struct task_struct *p) | |||
1235 | 1235 | ||
1236 | #define task_thread_info(task) (task)->thread_info | 1236 | #define task_thread_info(task) (task)->thread_info |
1237 | 1237 | ||
1238 | static inline void setup_thread_stack(struct task_struct *p, struct task_struct *org) | ||
1239 | { | ||
1240 | *task_thread_info(p) = *task_thread_info(org); | ||
1241 | task_thread_info(p)->task = p; | ||
1242 | } | ||
1243 | |||
1244 | static inline unsigned long *end_of_stack(struct task_struct *p) | ||
1245 | { | ||
1246 | return (unsigned long *)(p->thread_info + 1); | ||
1247 | } | ||
1248 | |||
1238 | /* set thread flags in other task's structures | 1249 | /* set thread flags in other task's structures |
1239 | * - see asm/thread_info.h for TIF_xxxx flags available | 1250 | * - see asm/thread_info.h for TIF_xxxx flags available |
1240 | */ | 1251 | */ |