Patchwork [qom-next,36/59] cpus: Pass CPUState to flush_queued_work()

login
register
mail settings
Submitter Andreas Färber
Date May 23, 2012, 3:07 a.m.
Message ID <1337742502-28565-37-git-send-email-afaerber@suse.de>
Download mbox | patch
Permalink /patch/160852/
State New
Headers show

Comments

Andreas Färber - May 23, 2012, 3:07 a.m.
CPUArchState is no longer needed there.

Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 cpus.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

Patch

diff --git a/cpus.c b/cpus.c
index e493218..2e7eafb 100644
--- a/cpus.c
+++ b/cpus.c
@@ -672,9 +672,8 @@  void run_on_cpu(CPUArchState *env, void (*func)(void *data), void *data)
     }
 }
 
-static void flush_queued_work(CPUArchState *env)
+static void flush_queued_work(CPUState *cpu)
 {
-    CPUState *cpu = ENV_GET_CPU(env);
     struct qemu_work_item *wi;
 
     if (cpu->queued_work_first == NULL) {
@@ -699,7 +698,7 @@  static void qemu_wait_io_event_common(CPUArchState *env)
         cpu->stopped = true;
         qemu_cond_signal(&qemu_pause_cond);
     }
-    flush_queued_work(env);
+    flush_queued_work(cpu);
     cpu->thread_kicked = false;
 }