diff options
author | Per Fogelstrom <pefo@cvs.openbsd.org> | 1998-09-30 12:40:42 +0000 |
---|---|---|
committer | Per Fogelstrom <pefo@cvs.openbsd.org> | 1998-09-30 12:40:42 +0000 |
commit | 62ff08b9c0be7b6875a2d7fde1ad5cb566f0da57 (patch) | |
tree | c6bd7147ee11f7d8c6d8163ce51b9af995bc259b /sys/arch/arc | |
parent | 8efe6f407ce5662b011b79bb475fd7b94a604581 (diff) |
Fix ERESTART bug introduced with trapframes
Diffstat (limited to 'sys/arch/arc')
-rw-r--r-- | sys/arch/arc/arc/trap.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/arch/arc/arc/trap.c b/sys/arch/arc/arc/trap.c index 39c9a179f8b..7aee2a17e0f 100644 --- a/sys/arch/arc/arc/trap.c +++ b/sys/arch/arc/arc/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.18 1998/09/15 10:58:54 pefo Exp $ */ +/* $OpenBSD: trap.c,v 1.19 1998/09/30 12:40:41 pefo Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -475,6 +475,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]; @@ -483,6 +484,7 @@ trap(trapframe) cnt.v_syscall++; /* compute next PC after syscall instruction */ + tpc = trapframe->pc; /* Remember if restart */ if ((int)trapframe->cause < 0) { /* Check BD bit */ locr0->pc = MipsEmulateBranch(locr0, trapframe->pc, 0, 0); } @@ -643,7 +645,7 @@ trap(trapframe) break; case ERESTART: - locr0->pc = trapframe->pc; + locr0->pc = tpc; break; case EJUSTRETURN: |