Skip to content

Commit

Permalink
Release SMP restriction on Windows
Browse files Browse the repository at this point in the history
The previous patches make QEMU SMP safe on Windows, we can now release
the restriction.

Signed-off-by: Fabien Chouteau <chouteau@adacore.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
  • Loading branch information
Fabien-Chouteau authored and stweil committed Apr 12, 2013
1 parent ec9bd89 commit 1046127
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions os-win32.c
Expand Up @@ -69,25 +69,7 @@ static BOOL WINAPI qemu_ctrl_handler(DWORD type)

void os_setup_early_signal_handling(void)
{
/* Note: cpu_interrupt() is currently not SMP safe, so we force
QEMU to run on a single CPU */
HANDLE h;
DWORD_PTR mask, smask;
int i;

SetConsoleCtrlHandler(qemu_ctrl_handler, TRUE);

h = GetCurrentProcess();
if (GetProcessAffinityMask(h, &mask, &smask)) {
for(i = 0; i < 32; i++) {
if (mask & (1 << i))
break;
}
if (i != 32) {
mask = 1 << i;
SetProcessAffinityMask(h, mask);
}
}
}

/* Look for support files in the same directory as the executable. */
Expand Down

0 comments on commit 1046127

Please sign in to comment.