summaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel/signal.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1998-03-22 23:27:12 +0000
committerRalf Baechle <ralf@linux-mips.org>1998-03-22 23:27:12 +0000
commit6dd778f9528c1acc17dbfca685f51bd5c3750d45 (patch)
tree45c8be9edc454b787dd06d3d4aee79dccea0a979 /arch/mips/kernel/signal.c
parentf1382dc4850bb459d24a81c6cb0ef93ea7bd4a79 (diff)
o Fix handling of interrupted syscalls.
o Just count missed heartbeats on Indys but don't print a messages. This was a bug by itself. o Fix a crash in exit_mmap(). o Fix scanmem(). o Fix clear_active_bh(), a ~ was missing causing weak performance. o Remove experimental cache instructions from stackframe.h. It wasn't improving performance as I was hoping. o Shrink the size of the exception handler routines in uaccess.h. o Cleanup, remove dead code in various files.
Diffstat (limited to 'arch/mips/kernel/signal.c')
-rw-r--r--arch/mips/kernel/signal.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/arch/mips/kernel/signal.c b/arch/mips/kernel/signal.c
index 390c3ef2b..0e7a24766 100644
--- a/arch/mips/kernel/signal.c
+++ b/arch/mips/kernel/signal.c
@@ -4,7 +4,7 @@
* Copyright (C) 1991, 1992 Linus Torvalds
* Copyright (C) 1994, 1995, 1996 Ralf Baechle
*
- * $Id: signal.c,v 1.8 1997/12/16 05:34:37 ralf Exp $
+ * $Id: signal.c,v 1.9 1998/03/17 22:07:36 ralf Exp $
*/
#include <linux/config.h>
#include <linux/sched.h>
@@ -347,11 +347,10 @@ static inline void handle_signal(unsigned long sig, struct k_sigaction *ka,
}
}
-static inline void syscall_restart(unsigned long r0, unsigned long or2,
- unsigned long or7, struct pt_regs *regs,
- struct sigaction *sa)
+static inline void syscall_restart(unsigned long or2, unsigned long or7,
+ struct pt_regs *regs, struct sigaction *sa)
{
- switch(r0) {
+ switch(regs->regs[0]) {
case ERESTARTNOHAND:
no_system_call_restart:
regs->regs[0] = regs->regs[2] = EINTR;
@@ -371,7 +370,6 @@ extern int do_irix_signal(sigset_t *oldset, struct pt_regs *regs);
asmlinkage int do_signal(sigset_t *oldset, struct pt_regs *regs)
{
- unsigned long r0 = regs->regs[0];
unsigned long r7 = regs->orig_reg7;
struct k_sigaction *ka;
siginfo_t info;
@@ -479,8 +477,8 @@ asmlinkage int do_signal(sigset_t *oldset, struct pt_regs *regs)
}
}
- if (r0)
- syscall_restart(r0, regs->orig_reg2, r7, regs, &ka->sa);
+ if (regs->regs[0])
+ syscall_restart(regs->orig_reg2, r7, regs, &ka->sa);
/* Whee! Actually deliver the signal. */
handle_signal(signr, ka, &info, oldset, regs);
return 1;
@@ -491,13 +489,14 @@ asmlinkage int do_signal(sigset_t *oldset, struct pt_regs *regs)
* dies here!!! The li instruction, a single machine instruction,
* must directly be followed by the syscall instruction.
*/
- if (r0 &&
- (regs->regs[2] == ERESTARTNOHAND ||
- regs->regs[2] == ERESTARTSYS ||
- regs->regs[2] == ERESTARTNOINTR)) {
+ if (regs->regs[0]) {
+ if (regs->regs[2] == ERESTARTNOHAND ||
+ regs->regs[2] == ERESTARTSYS ||
+ regs->regs[2] == ERESTARTNOINTR) {
regs->regs[0] = regs->regs[2] = regs->orig_reg2;
regs->regs[7] = r7;
regs->cp0_epc -= 8;
+ }
}
return 0;
}