[PATCH] dump_thread() cleanup

)

From: Adrian Bunk <bunk@stusta.de>

- create one common dump_thread() prototype in kernel.h

- dump_thread() is only used in fs/binfmt_aout.c and can therefore be
  removed on all architectures where CONFIG_BINFMT_AOUT is not
  available

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
akpm@osdl.org
2006-01-09 20:51:37 -08:00
committed by Linus Torvalds
parent be4f1bb262
commit df2e71fb91
28 changed files with 5 additions and 250 deletions

View File

@@ -352,27 +352,6 @@ int dump_fpu (struct pt_regs * regs, s390_fp_regs *fpregs)
return 1;
}
/*
* fill in the user structure for a core dump..
*/
void dump_thread(struct pt_regs * regs, struct user * dump)
{
/* changed the size calculations - should hopefully work better. lbt */
dump->magic = CMAGIC;
dump->start_code = 0;
dump->start_stack = regs->gprs[15] & ~(PAGE_SIZE - 1);
dump->u_tsize = current->mm->end_code >> PAGE_SHIFT;
dump->u_dsize = (current->mm->brk + PAGE_SIZE - 1) >> PAGE_SHIFT;
dump->u_dsize -= dump->u_tsize;
dump->u_ssize = 0;
if (dump->start_stack < TASK_SIZE)
dump->u_ssize = (TASK_SIZE - dump->start_stack) >> PAGE_SHIFT;
memcpy(&dump->regs, regs, sizeof(s390_regs));
dump_fpu (regs, &dump->regs.fp_regs);
dump->regs.per_info = current->thread.per_info;
}
unsigned long get_wchan(struct task_struct *p)
{
struct stack_frame *sf, *low, *high;