summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main-loop.c1
-rw-r--r--vl.c4
2 files changed, 3 insertions, 2 deletions
diff --git a/main-loop.c b/main-loop.c
index 234a3130c2..c87624e621 100644
--- a/main-loop.c
+++ b/main-loop.c
@@ -128,7 +128,6 @@ int qemu_init_main_loop(void)
exit(1);
}
- qemu_mutex_lock_iothread();
ret = qemu_signal_init();
if (ret) {
return ret;
diff --git a/vl.c b/vl.c
index e2d5276988..0f5b07bbde 100644
--- a/vl.c
+++ b/vl.c
@@ -3477,7 +3477,6 @@ int main(int argc, char **argv, char **envp)
}
loc_set_none();
- qemu_init_cpu_loop();
if (qemu_init_main_loop()) {
fprintf(stderr, "qemu_init_main_loop failed\n");
exit(1);
@@ -3677,6 +3676,9 @@ int main(int argc, char **argv, char **envp)
os_set_line_buffering();
+ qemu_init_cpu_loop();
+ qemu_mutex_lock_iothread();
+
#ifdef CONFIG_SPICE
/* spice needs the timers to be initialized by this point */
qemu_spice_init();