[PATCH] m68k: introduce setup_thread_stack() and end_of_stack()
encapsulates the rest of arch-dependent operations with thread_info access. Two new helpers - setup_thread_stack() and end_of_stack(). For normal case the former consists of copying thread_info of parent to new thread_info and the latter returns pointer immediately past the end of thread_info. Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk> Signed-off-by: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
@ -171,10 +171,9 @@ static struct task_struct *dup_task_struct(struct task_struct *orig)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
*ti = *orig->thread_info;
|
||||
*tsk = *orig;
|
||||
tsk->thread_info = ti;
|
||||
ti->task = tsk;
|
||||
setup_thread_stack(tsk, orig);
|
||||
|
||||
/* One for us, one for whoever does the "release_task()" (usually parent) */
|
||||
atomic_set(&tsk->usage,2);
|
||||
|
Reference in New Issue
Block a user