patch-2.1.124 linux/arch/i386/kernel/process.c
Next file: linux/arch/i386/kernel/ptrace.c
Previous file: linux/arch/i386/kernel/mtrr.c
Back to the patch index
Back to the overall index
- Lines: 64
- Date:
Wed Sep 30 10:16:56 1998
- Orig file:
v2.1.123/linux/arch/i386/kernel/process.c
- Orig date:
Mon Sep 28 10:51:33 1998
diff -u --recursive --new-file v2.1.123/linux/arch/i386/kernel/process.c linux/arch/i386/kernel/process.c
@@ -519,34 +519,22 @@
void flush_thread(void)
{
int i;
+ struct task_struct *tsk = current;
for (i=0 ; i<8 ; i++)
- current->tss.debugreg[i] = 0;
+ tsk->tss.debugreg[i] = 0;
/*
* Forget coprocessor state..
*/
- if (current->flags & PF_USEDFPU) {
- current->flags &= ~PF_USEDFPU;
- stts();
- }
- current->used_math = 0;
+ clear_fpu(tsk);
+ tsk->used_math = 0;
}
void release_thread(struct task_struct *dead_task)
{
}
-static inline void unlazy_fpu(struct task_struct *tsk)
-{
- if (tsk->flags & PF_USEDFPU) {
- __asm__("fnsave %0":"=m" (tsk->tss.i387));
- asm volatile("fwait");
- tsk->flags &= ~PF_USEDFPU;
- stts();
- }
-}
-
/*
* If new_mm is NULL, we're being called to set up the LDT descriptor
* for a clone task. Each clone must have a separate entry in the GDT.
@@ -621,11 +609,12 @@
int dump_fpu (struct pt_regs * regs, struct user_i387_struct* fpu)
{
int fpvalid;
+ struct task_struct *tsk = current;
- fpvalid = current->used_math;
+ fpvalid = tsk->used_math;
if (fpvalid) {
- unlazy_fpu(current);
- memcpy(fpu,¤t->tss.i387.hard,sizeof(*fpu));
+ unlazy_fpu(tsk);
+ memcpy(fpu,&tsk->tss.i387.hard,sizeof(*fpu));
}
return fpvalid;
@@ -793,6 +782,8 @@
if (IS_ERR(filename))
goto out;
error = do_execve(filename, (char **) regs.ecx, (char **) regs.edx, ®s);
+ if (error == 0)
+ current->flags &= ~PF_DTRACE;
putname(filename);
out:
unlock_kernel();
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov