aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBlue Swirl <blauwirbel@gmail.com>2010-04-12 17:19:06 +0000
committerBlue Swirl <blauwirbel@gmail.com>2010-04-12 17:19:06 +0000
commit7277e027bbbf708979c82c44714f9105bf8e62d7 (patch)
treed65a019fa9eefaa3058e7095ef0f2522119dced4
parent24f7fb19b397c22ddb1582d8e489727f1dc53bef (diff)
Fix build when configured with --enable-io-thread
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
-rw-r--r--cpus.c16
-rw-r--r--cpus.h4
-rw-r--r--vl.c13
3 files changed, 21 insertions, 12 deletions
diff --git a/cpus.c b/cpus.c
index 0debe772e5..8450ee4ff4 100644
--- a/cpus.c
+++ b/cpus.c
@@ -33,6 +33,12 @@
#include "cpus.h"
+#ifdef SIGRTMIN
+#define SIG_IPI (SIGRTMIN+4)
+#else
+#define SIG_IPI SIGUSR1
+#endif
+
static CPUState *cur_cpu;
static CPUState *next_cpu;
@@ -226,6 +232,10 @@ int qemu_init_main_loop(void)
return qemu_event_init();
}
+void qemu_main_loop_start(void)
+{
+}
+
void qemu_init_vcpu(void *_env)
{
CPUState *env = _env;
@@ -318,6 +328,12 @@ int qemu_init_main_loop(void)
return 0;
}
+void qemu_main_loop_start(void)
+{
+ qemu_system_ready = 1;
+ qemu_cond_broadcast(&qemu_system_cond);
+}
+
static void qemu_wait_io_event_common(CPUState *env)
{
if (env->stop) {
diff --git a/cpus.h b/cpus.h
index 67c9a3b45e..4ebad3a36f 100644
--- a/cpus.h
+++ b/cpus.h
@@ -1,8 +1,9 @@
#ifndef QEMU_CPUS_H
#define QEMU_CPUS_H
-/* cpu-common.c */
+/* cpus.c */
int qemu_init_main_loop(void);
+void qemu_main_loop_start(void);
void resume_all_vcpus(void);
void pause_all_vcpus(void);
@@ -10,6 +11,7 @@ void pause_all_vcpus(void);
extern int smp_cores;
extern int smp_threads;
extern int debug_requested;
+extern int vmstop_requested;
void vm_state_notify(int running, int reason);
bool tcg_cpu_exec(void);
void set_numa_modes(void);
diff --git a/vl.c b/vl.c
index ea79ac4437..4fb55b89e8 100644
--- a/vl.c
+++ b/vl.c
@@ -244,12 +244,6 @@ int kvm_allowed = 0;
uint32_t xen_domid;
enum xen_mode xen_mode = XEN_EMULATE;
-#ifdef SIGRTMIN
-#define SIG_IPI (SIGRTMIN+4)
-#else
-#define SIG_IPI SIGUSR1
-#endif
-
static int default_serial = 1;
static int default_parallel = 1;
static int default_virtcon = 1;
@@ -1717,7 +1711,7 @@ static int reset_requested;
static int shutdown_requested;
static int powerdown_requested;
int debug_requested;
-static int vmstop_requested;
+int vmstop_requested;
int qemu_shutdown_requested(void)
{
@@ -1955,10 +1949,7 @@ static void main_loop(void)
{
int r;
-#ifdef CONFIG_IOTHREAD
- qemu_system_ready = 1;
- qemu_cond_broadcast(&qemu_system_cond);
-#endif
+ qemu_main_loop_start();
for (;;) {
do {