diff options
author | Jason Downs <downsj@cvs.openbsd.org> | 1998-12-28 11:03:58 +0000 |
---|---|---|
committer | Jason Downs <downsj@cvs.openbsd.org> | 1998-12-28 11:03:58 +0000 |
commit | 325ba381fa93f6c09f832aabe98027d0f98c8e68 (patch) | |
tree | 70b89e746431b3843f09f93af175264ea7c53e98 /sys/arch | |
parent | c5aaaf6969d4153721d2cfddcb950d49a370068f (diff) |
Small hack to pass out VM86 traps using a siginfo field.
(There is no other way in our kernel.)
VM86 applications must use real sigaction handlers with SA_SIGINFO in order
to get their traps.
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/i386/i386/machdep.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c index ce0ca0ecc72..bda1cfdd4a0 100644 --- a/sys/arch/i386/i386/machdep.c +++ b/sys/arch/i386/i386/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.94 1998/09/28 05:13:13 downsj Exp $ */ +/* $OpenBSD: machdep.c,v 1.95 1998/12/28 11:03:57 downsj Exp $ */ /* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */ /*- @@ -1065,6 +1065,10 @@ sendsig(catcher, sig, mask, code, type, val) if (psp->ps_siginfo & sigmask(sig)) { frame.sf_sip = &fp->sf_si; initsiginfo(&frame.sf_si, sig, code, type, val); +#ifdef VM86 + if (sig == SIGURG) /* VM86 userland trap */ + frame.sf_si.si_trapno = code; +#endif } /* XXX don't copyout siginfo if not needed? */ |