]> git.proxmox.com Git - qemu.git/commitdiff
Rename tcg_cpu_exec and tcg_has_work
authorJan Kiszka <jan.kiszka@siemens.com>
Fri, 25 Jun 2010 14:56:55 +0000 (16:56 +0200)
committerAurelien Jarno <aurelien@aurel32.net>
Thu, 22 Jul 2010 03:52:09 +0000 (05:52 +0200)
These functions are also used for kvm under !CONFIG_IOTHREAD, having
'tcg' in their name is just misleading.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
cpus.c
cpus.h
vl.c

diff --git a/cpus.c b/cpus.c
index 7f66eda54e2c0a3aace879bcea0a343af8734cb6..03ebcb0c61f9d2b1af0f181aef161fcdb4186bbe 100644 (file)
--- a/cpus.c
+++ b/cpus.c
@@ -131,7 +131,7 @@ static int cpu_has_work(CPUState *env)
     return 0;
 }
 
-static int tcg_has_work(void)
+static int any_cpu_has_work(void)
 {
     CPUState *env;
 
@@ -406,7 +406,7 @@ static void qemu_tcg_wait_io_event(void)
 {
     CPUState *env;
 
-    while (!tcg_has_work())
+    while (!any_cpu_has_work())
         qemu_cond_timedwait(tcg_halt_cond, &qemu_global_mutex, 1000);
 
     qemu_mutex_unlock(&qemu_global_mutex);
@@ -507,7 +507,7 @@ static void *tcg_cpu_thread_fn(void *arg)
         qemu_cond_timedwait(&qemu_system_cond, &qemu_global_mutex, 100);
 
     while (1) {
-        tcg_cpu_exec();
+        cpu_exec_all();
         qemu_tcg_wait_io_event();
     }
 
@@ -768,7 +768,7 @@ static int qemu_cpu_exec(CPUState *env)
     return ret;
 }
 
-bool tcg_cpu_exec(void)
+bool cpu_exec_all(void)
 {
     int ret = 0;
 
@@ -794,7 +794,7 @@ bool tcg_cpu_exec(void)
         }
     }
     exit_request = 0;
-    return tcg_has_work();
+    return any_cpu_has_work();
 }
 
 void set_numa_modes(void)
diff --git a/cpus.h b/cpus.h
index 774150a763a53cbc28dcab51cd52f5b98804a505..af267ea07f10566a80658727e3b8791fe3cc6f85 100644 (file)
--- a/cpus.h
+++ b/cpus.h
@@ -13,7 +13,7 @@ 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);
+bool cpu_exec_all(void);
 void set_numa_modes(void);
 void set_cpu_log(const char *optarg);
 void list_cpus(FILE *f, int (*cpu_fprintf)(FILE *f, const char *fmt, ...),
diff --git a/vl.c b/vl.c
index 8a5de9fac144b52dcc9589122bab615d1abbc576..ba6ee11ec467436be689a5bc5d3b5c23ef0287b9 100644 (file)
--- a/vl.c
+++ b/vl.c
@@ -1325,7 +1325,7 @@ static void main_loop(void)
             int64_t ti;
 #endif
 #ifndef CONFIG_IOTHREAD
-            nonblocking = tcg_cpu_exec();
+            nonblocking = cpu_exec_all();
 #endif
 #ifdef CONFIG_PROFILER
             ti = profile_getclock();