diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2007-11-21 18:52:53 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2007-11-21 18:52:53 +0000 |
commit | 2c948961917f33a1297348f41a40465b09785462 (patch) | |
tree | eb7bce7090118ceea74cc2853cec558057001d4d /sys/arch | |
parent | bdc71c06e21956f903b4203455a29429a25ccfc2 (diff) |
A really horrible fix for sigreturn on 88110. This will probably be replaced
by something better in the future, but for now this will do. Just don't
tell anyone I did this.
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/m88k/m88k/sig_machdep.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/sys/arch/m88k/m88k/sig_machdep.c b/sys/arch/m88k/m88k/sig_machdep.c index e30b95bc3a7..0f8144a8439 100644 --- a/sys/arch/m88k/m88k/sig_machdep.c +++ b/sys/arch/m88k/m88k/sig_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sig_machdep.c,v 1.5 2007/11/17 05:36:23 miod Exp $ */ +/* $OpenBSD: sig_machdep.c,v 1.6 2007/11/21 18:52:52 miod Exp $ */ /* * Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr. * Copyright (c) 1996 Nivas Madhur @@ -224,5 +224,13 @@ sys_sigreturn(struct proc *p, void *v, register_t *retval) p->p_sigacts->ps_sigstk.ss_flags &= ~SS_ONSTACK; p->p_sigmask = scp->sc_mask & ~sigcantmask; - return (EJUSTRETURN); + /* + * We really want to return to the instruction pointed to by + * the sigcontext. However, due to the way exceptions work + * on 88110, returning EJUSTRETURN will cause m88110_syscall() + * to skip one instruction. We avoid this by returning + * ERESTART, which will indeed cause the instruction pointed + * to by exip to be run. + */ + return (CPU_IS88100 ? EJUSTRETURN : ERESTART); } |