From 325ba381fa93f6c09f832aabe98027d0f98c8e68 Mon Sep 17 00:00:00 2001 From: Jason Downs Date: Mon, 28 Dec 1998 11:03:58 +0000 Subject: 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. --- sys/arch/i386/i386/machdep.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'sys/arch/i386') 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? */ -- cgit v1.2.3