patch-2.1.109 linux/arch/i386/kernel/ptrace.c
Next file: linux/arch/i386/kernel/setup.c
Previous file: linux/arch/i386/kernel/process.c
Back to the patch index
Back to the overall index
- Lines: 32
- Date:
Wed Jul 8 11:38:05 1998
- Orig file:
v2.1.108/linux/arch/i386/kernel/ptrace.c
- Orig date:
Thu May 7 22:51:46 1998
diff -u --recursive --new-file v2.1.108/linux/arch/i386/kernel/ptrace.c linux/arch/i386/kernel/ptrace.c
@@ -624,14 +624,8 @@
#ifdef CONFIG_MATH_EMULATION
if ( boot_cpu_data.hard_math ) {
#endif
- if (last_task_used_math == child) {
- clts();
- __asm__("fnsave %0; fwait":"=m" (child->tss.i387.hard));
- last_task_used_math = NULL;
- stts();
- }
- __copy_to_user((void *)data, &child->tss.i387.hard,
- sizeof(struct user_i387_struct));
+ __copy_to_user((void *)data, &child->tss.i387.hard,
+ sizeof(struct user_i387_struct));
#ifdef CONFIG_MATH_EMULATION
} else {
save_i387_soft(&child->tss.i387.soft,
@@ -652,13 +646,10 @@
#ifdef CONFIG_MATH_EMULATION
if ( boot_cpu_data.hard_math ) {
#endif
- if (last_task_used_math == child) {
- /* Discard the state of the FPU */
- last_task_used_math = NULL;
- }
__copy_from_user(&child->tss.i387.hard, (void *)data,
sizeof(struct user_i387_struct));
child->flags &= ~PF_USEDFPU;
+ stts();
#ifdef CONFIG_MATH_EMULATION
} else {
restore_i387_soft(&child->tss.i387.soft,
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov