udf: Move filling of partition descriptor info into a separate function
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / arch / sh / kernel / dump_task.c
blob4a8a4083ff0b6a75ed166f454c5a1d3513819e09
1 #include <linux/elfcore.h>
2 #include <linux/sched.h>
4 /*
5 * Capture the user space registers if the task is not running (in user space)
6 */
7 int dump_task_regs(struct task_struct *tsk, elf_gregset_t *regs)
9 struct pt_regs ptregs;
11 ptregs = *task_pt_regs(tsk);
12 elf_core_copy_regs(regs, &ptregs);
14 return 1;
17 int dump_task_fpu(struct task_struct *tsk, elf_fpregset_t *fpu)
19 int fpvalid = 0;
21 #if defined(CONFIG_SH_FPU)
22 fpvalid = !!tsk_used_math(tsk);
23 if (fpvalid) {
24 unlazy_fpu(tsk, task_pt_regs(tsk));
25 memcpy(fpu, &tsk->thread.fpu.hard, sizeof(*fpu));
27 #endif
29 return fpvalid;