patch-2.1.103 linux/arch/i386/kernel/process.c
Next file: linux/arch/i386/kernel/smp.c
Previous file: linux/arch/i386/kernel/irq.h
Back to the patch index
Back to the overall index
- Lines: 31
- Date:
Tue May 19 09:46:39 1998
- Orig file:
v2.1.102/linux/arch/i386/kernel/process.c
- Orig date:
Thu May 14 19:47:38 1998
diff -u --recursive --new-file v2.1.102/linux/arch/i386/kernel/process.c linux/arch/i386/kernel/process.c
@@ -46,6 +46,8 @@
#endif
#include "irq.h"
+struct task_struct *last_task_used_math = NULL;
+
#ifdef __SMP__
asmlinkage void ret_from_smpfork(void) __asm__("ret_from_smpfork");
#else
@@ -528,18 +530,12 @@
*/
p->tss.bitmap = sizeof(struct thread_struct);
-/*
- * This tried to copy the FPU state, but I wonder whether we really
- * want this at all. It is probably nicer to just have a newly started
- * process start with a clean slate wrt the fpu. - Linus
- */
-#if 1
- current->used_math = 0;
- current->flags &= ~PF_USEDFPU;
+#ifdef __SMP__
+ if (current->flags & PF_USEDFPU)
#else
if (last_task_used_math == current)
- __asm__("clts ; fnsave %0 ; frstor %0":"=m" (p->tss.i387));
#endif
+ __asm__("clts ; fnsave %0 ; frstor %0":"=m" (p->tss.i387));
return 0;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov