diff options
author | jkim <jkim@FreeBSD.org> | 2010-08-10 15:22:48 +0000 |
---|---|---|
committer | jkim <jkim@FreeBSD.org> | 2010-08-10 15:22:48 +0000 |
commit | b25a1960780811b3e7bc68abb4b0dd11c1625bec (patch) | |
tree | 91383ea57d07869f1ae9d567cddf7a92b6f73ee5 | |
parent | f7a0e057bcc5050148ddd0c051f089e4a85a06e2 (diff) | |
download | FreeBSD-src-b25a1960780811b3e7bc68abb4b0dd11c1625bec.zip FreeBSD-src-b25a1960780811b3e7bc68abb4b0dd11c1625bec.tar.gz |
Place spinlock_enter() and spinlock_exit() just around X86EMU calls.
-rw-r--r-- | sys/compat/x86bios/x86bios.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/compat/x86bios/x86bios.c b/sys/compat/x86bios/x86bios.c index 78f8887..224520c2c4 100644 --- a/sys/compat/x86bios/x86bios.c +++ b/sys/compat/x86bios/x86bios.c @@ -599,12 +599,12 @@ x86bios_call(struct x86regs *regs, uint16_t seg, uint16_t off) X86BIOS_TRACE(Calling 0x%06x, (seg << 4) + off, regs); mtx_lock(&x86bios_lock); - spinlock_enter(); memcpy(&x86bios_emu.x86, regs, sizeof(*regs)); x86bios_fault = 0; + spinlock_enter(); x86emu_exec_call(&x86bios_emu, seg, off); - memcpy(regs, &x86bios_emu.x86, sizeof(*regs)); spinlock_exit(); + memcpy(regs, &x86bios_emu.x86, sizeof(*regs)); mtx_unlock(&x86bios_lock); if (x86bios_trace_call) { @@ -637,12 +637,12 @@ x86bios_intr(struct x86regs *regs, int intno) X86BIOS_TRACE(Calling INT 0x%02x, intno, regs); mtx_lock(&x86bios_lock); - spinlock_enter(); memcpy(&x86bios_emu.x86, regs, sizeof(*regs)); x86bios_fault = 0; + spinlock_enter(); x86emu_exec_intr(&x86bios_emu, intno); - memcpy(regs, &x86bios_emu.x86, sizeof(*regs)); spinlock_exit(); + memcpy(regs, &x86bios_emu.x86, sizeof(*regs)); mtx_unlock(&x86bios_lock); if (x86bios_trace_int) { |