patch-2.4.0-test2 linux/arch/i386/kernel/signal.c
Next file: linux/arch/i386/kernel/smpboot.c
Previous file: linux/arch/i386/kernel/setup.c
Back to the patch index
Back to the overall index
- Lines: 97
- Date:
Thu Jun 22 06:59:53 2000
- Orig file:
v2.4.0-test1/linux/arch/i386/kernel/signal.c
- Orig date:
Mon Jun 19 16:31:57 2000
diff -u --recursive --new-file v2.4.0-test1/linux/arch/i386/kernel/signal.c linux/arch/i386/kernel/signal.c
@@ -4,12 +4,9 @@
* Copyright (C) 1991, 1992 Linus Torvalds
*
* 1997-11-28 Modified for POSIX.1b signals by Richard Henderson
- * Pentium III support by Ingo Molnar, modifications and OS Exception support
- * by Goutham Rao
+ * 2000-06-20 Pentium III FXSR, SSE support by Gareth Hughes
*/
-#include <linux/config.h>
-
#include <linux/sched.h>
#include <linux/mm.h>
#include <linux/smp.h>
@@ -23,6 +20,7 @@
#include <linux/stddef.h>
#include <asm/ucontext.h>
#include <asm/uaccess.h>
+#include <asm/i387.h>
#define DEBUG_SIG 0
@@ -187,29 +185,6 @@
char retcode[8];
};
-
-static inline int restore_i387_hard(struct _fpstate *buf)
-{
- struct task_struct *tsk = current;
- clear_fpu(tsk);
- return i387_user_to_hard(&tsk->thread.i387.hard, buf);
-}
-
-static inline int restore_i387(struct _fpstate *buf)
-{
- int err;
-#ifndef CONFIG_MATH_EMULATION
- err = restore_i387_hard(buf);
-#else
- if (boot_cpu_data.hard_math)
- err = restore_i387_hard(buf);
- else
- err = restore_i387_soft(¤t->thread.i387.soft, buf);
-#endif
- current->used_math = 1;
- return err;
-}
-
static int
restore_sigcontext(struct pt_regs *regs, struct sigcontext *sc, int *peax)
{
@@ -340,35 +315,6 @@
* Set up a signal frame.
*/
-static inline int save_i387_hard(struct _fpstate * buf)
-{
- struct task_struct *tsk = current;
-
- unlazy_fpu(tsk);
- tsk->thread.i387.hard.status = tsk->thread.i387.hard.swd;
- if (i387_hard_to_user(buf, &tsk->thread.i387.hard))
- return -1;
- return 1;
-}
-
-static int save_i387(struct _fpstate *buf)
-{
- if (!current->used_math)
- return 0;
-
- /* This will cause a "finit" to be triggered by the next
- attempted FPU operation by the 'current' process.
- */
- current->used_math = 0;
-
-#ifndef CONFIG_MATH_EMULATION
- return save_i387_hard(buf);
-#else
- return boot_cpu_data.hard_math ? save_i387_hard(buf)
- : save_i387_soft(¤t->thread.i387.soft, buf);
-#endif
-}
-
static int
setup_sigcontext(struct sigcontext *sc, struct _fpstate *fpstate,
struct pt_regs *regs, unsigned long mask)
@@ -662,7 +608,7 @@
if (!signr)
break;
- if ((current->flags & PF_PTRACED) && signr != SIGKILL) {
+ if ((current->ptrace & PT_PTRACED) && signr != SIGKILL) {
/* Let the debugger run. */
current->exit_code = signr;
current->state = TASK_STOPPED;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)