* [Qemu-devel] [7065] BSD user: add support for OpenBSD/i386 host
@ 2009-04-10 7:29 Blue Swirl
0 siblings, 0 replies; only message in thread
From: Blue Swirl @ 2009-04-10 7:29 UTC (permalink / raw)
To: qemu-devel
Revision: 7065
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=7065
Author: blueswir1
Date: 2009-04-10 07:29:34 +0000 (Fri, 10 Apr 2009)
Log Message:
-----------
BSD user: add support for OpenBSD/i386 host
Modified Paths:
--------------
trunk/cpu-exec.c
Modified: trunk/cpu-exec.c
===================================================================
--- trunk/cpu-exec.c 2009-04-10 03:36:49 UTC (rev 7064)
+++ trunk/cpu-exec.c 2009-04-10 07:29:34 UTC (rev 7065)
@@ -1165,17 +1165,28 @@
# define EIP_sig(context) (*((unsigned long*)&(context)->uc_mcontext->ss.eip))
# define TRAP_sig(context) ((context)->uc_mcontext->es.trapno)
# define ERROR_sig(context) ((context)->uc_mcontext->es.err)
+# define MASK_sig(context) ((context)->uc_sigmask)
+#elif defined(__OpenBSD__)
+# define EIP_sig(context) ((context)->sc_eip)
+# define TRAP_sig(context) ((context)->sc_trapno)
+# define ERROR_sig(context) ((context)->sc_err)
+# define MASK_sig(context) ((context)->sc_mask)
#else
# define EIP_sig(context) ((context)->uc_mcontext.gregs[REG_EIP])
# define TRAP_sig(context) ((context)->uc_mcontext.gregs[REG_TRAPNO])
# define ERROR_sig(context) ((context)->uc_mcontext.gregs[REG_ERR])
+# define MASK_sig(context) ((context)->uc_sigmask)
#endif
int cpu_signal_handler(int host_signum, void *pinfo,
void *puc)
{
siginfo_t *info = pinfo;
+#if defined(__OpenBSD__)
+ struct sigcontext *uc = puc;
+#else
struct ucontext *uc = puc;
+#endif
unsigned long pc;
int trapno;
@@ -1190,7 +1201,7 @@
return handle_cpu_signal(pc, (unsigned long)info->si_addr,
trapno == 0xe ?
(ERROR_sig(uc) >> 1) & 1 : 0,
- &uc->uc_sigmask, puc);
+ &MASK_sig(uc), puc);
}
#elif defined(__x86_64__)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-04-10 7:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-10 7:29 [Qemu-devel] [7065] BSD user: add support for OpenBSD/i386 host Blue Swirl
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).