mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 07:13:54 -06:00
kqemu_cpu_interrupt support for win32 (Filip Navara)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1566 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
ca0d1734b4
commit
a332e112b7
3 changed files with 21 additions and 5 deletions
22
kqemu.c
22
kqemu.c
|
@ -596,11 +596,14 @@ int kqemu_cpu_exec(CPUState *env)
|
|||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
DeviceIoControl(kqemu_fd, KQEMU_EXEC,
|
||||
kenv, sizeof(struct kqemu_cpu_state),
|
||||
kenv, sizeof(struct kqemu_cpu_state),
|
||||
&temp, NULL);
|
||||
ret = kenv->retval;
|
||||
if (DeviceIoControl(kqemu_fd, KQEMU_EXEC,
|
||||
kenv, sizeof(struct kqemu_cpu_state),
|
||||
kenv, sizeof(struct kqemu_cpu_state),
|
||||
&temp, NULL)) {
|
||||
ret = kenv->retval;
|
||||
} else {
|
||||
ret = -1;
|
||||
}
|
||||
#else
|
||||
#if KQEMU_VERSION >= 0x010100
|
||||
ioctl(kqemu_fd, KQEMU_EXEC, kenv);
|
||||
|
@ -737,4 +740,13 @@ int kqemu_cpu_exec(CPUState *env)
|
|||
return 0;
|
||||
}
|
||||
|
||||
void kqemu_cpu_interrupt(CPUState *env)
|
||||
{
|
||||
#if defined(_WIN32) && KQEMU_VERSION >= 0x010101
|
||||
/* cancelling the I/O request causes KQEMU to finish executing the
|
||||
current block and successfully returning. */
|
||||
CancelIo(kqemu_fd);
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue