aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/fork.c
diff options
context:
space:
mode:
authorAl Viro <viro@parcelfarce.linux.theplanet.co.uk>2005-11-13 19:06:56 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-13 21:14:13 -0500
commit10ebffde3d3916026974352b7900e44afe2b243f (patch)
treeac88fa33694f5bea1b6958e1e56bcd4c9b95b002 /kernel/fork.c
parenta1261f54611ec4ad6a7ab7080f86747e3ac3685b (diff)
[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>
Diffstat (limited to 'kernel/fork.c')
-rw-r--r--kernel/fork.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/kernel/fork.c b/kernel/fork.c
index 7ef352ce347b..2c70c9cdf5dc 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -171,10 +171,9 @@ static struct task_struct *dup_task_struct(struct task_struct *orig)
171 return NULL; 171 return NULL;
172 } 172 }
173 173
174 *ti = *orig->thread_info;
175 *tsk = *orig; 174 *tsk = *orig;
176 tsk->thread_info = ti; 175 tsk->thread_info = ti;
177 ti->task = tsk; 176 setup_thread_stack(tsk, orig);
178 177
179 /* One for us, one for whoever does the "release_task()" (usually parent) */ 178 /* One for us, one for whoever does the "release_task()" (usually parent) */
180 atomic_set(&tsk->usage,2); 179 atomic_set(&tsk->usage,2);