diff options
author | Per Fogelstrom <pefo@cvs.openbsd.org> | 1998-09-30 12:38:45 +0000 |
---|---|---|
committer | Per Fogelstrom <pefo@cvs.openbsd.org> | 1998-09-30 12:38:45 +0000 |
commit | 8efe6f407ce5662b011b79bb475fd7b94a604581 (patch) | |
tree | 1603864773622184e444f544692be9c1a074b7a5 /sys/arch | |
parent | ecb069f6120bae39ffd7fd359fd64e9760c08ca9 (diff) |
Fix ERESTART bug introduced with trapframes
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/pmax/pmax/trap.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/arch/pmax/pmax/trap.c b/sys/arch/pmax/pmax/trap.c index ad431289bb0..c93e11327b5 100644 --- a/sys/arch/pmax/pmax/trap.c +++ b/sys/arch/pmax/pmax/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.15 1998/09/15 10:53:55 pefo Exp $ */ +/* $OpenBSD: trap.c,v 1.16 1998/09/30 12:38:44 pefo Exp $ */ /* $NetBSD: trap.c,v 1.50 1996/10/13 21:37:49 jonathan Exp $ */ /* @@ -620,6 +620,7 @@ trap(trapframe) struct trap_frame *locr0 = p->p_md.md_regs; struct sysent *callp; unsigned int code; + unsigned int tpc; int numsys; struct args { int i[8]; @@ -628,6 +629,7 @@ trap(trapframe) cnt.v_syscall++; /* compute next PC after syscall instruction */ + tpc = trapframe->pc; /* Remember if restarted! */ if ((int)trapframe->cause < 0) locr0->pc = MachEmulateBranch(locr0, trapframe->pc, 0, 0); else @@ -787,7 +789,7 @@ trap(trapframe) break; case ERESTART: - locr0->pc = trapframe->pc; + locr0->pc = tpc; break; case EJUSTRETURN: |