summaryrefslogtreecommitdiffstats
path: root/kernel/sched.c
diff options
context:
space:
mode:
authorAl Viro <viro@parcelfarce.linux.theplanet.co.uk>2005-11-14 01:06:56 +0100
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-14 03:14:13 +0100
commit10ebffde3d3916026974352b7900e44afe2b243f (patch)
treeac88fa33694f5bea1b6958e1e56bcd4c9b95b002 /kernel/sched.c
parent[PATCH] m68k: introduce task_thread_info (diff)
downloadlinux-10ebffde3d3916026974352b7900e44afe2b243f.tar.xz
linux-10ebffde3d3916026974352b7900e44afe2b243f.zip
[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/sched.c')
-rw-r--r--kernel/sched.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index 831f7e9d8f1c..6f46c94cc29e 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -4327,10 +4327,10 @@ static void show_task(task_t *p)
#endif
#ifdef CONFIG_DEBUG_STACK_USAGE
{
- unsigned long *n = (unsigned long *) (p->thread_info+1);
+ unsigned long *n = end_of_stack(p);
while (!*n)
n++;
- free = (unsigned long) n - (unsigned long)(p->thread_info+1);
+ free = (unsigned long)n - (unsigned long)end_of_stack(p);
}
#endif
printk("%5lu %5d %6d ", free, p->pid, p->parent->pid);