Patchwork [6/8] Drop redundant global cur_cpu variable

login
register
mail settings
Submitter Jan Kiszka
Date June 25, 2010, 2:56 p.m.
Message ID <54cf8594a44ae3d6a635d6b46e98206bd82bf8d2.1277477810.git.jan.kiszka@siemens.com>
Download mbox | patch
Permalink /patch/56982/
State New
Headers show

Comments

Jan Kiszka - June 25, 2010, 2:56 p.m.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 cpus.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

Patch

diff --git a/cpus.c b/cpus.c
index aef92cd..2ce839d 100644
--- a/cpus.c
+++ b/cpus.c
@@ -39,7 +39,6 @@ 
 #define SIG_IPI SIGUSR1
 #endif
 
-static CPUState *cur_cpu;
 static CPUState *next_cpu;
 
 /***********************************************************/
@@ -775,10 +774,10 @@  bool tcg_cpu_exec(void)
     if (next_cpu == NULL)
         next_cpu = first_cpu;
     for (; next_cpu != NULL && !exit_request; next_cpu = next_cpu->next_cpu) {
-        CPUState *env = cur_cpu = next_cpu;
+        CPUState *env = next_cpu;
 
         qemu_clock_enable(vm_clock,
-                          (cur_cpu->singlestep_enabled & SSTEP_NOTIMER) == 0);
+                          (env->singlestep_enabled & SSTEP_NOTIMER) == 0);
 
         if (qemu_alarm_pending())
             break;