diff options
| author | Paolo Bonzini | 2018-01-30 17:04:53 +0100 |
|---|---|---|
| committer | Paolo Bonzini | 2018-02-07 14:09:25 +0100 |
| commit | d2831ab065765c8af13a5bb42627150323a96662 (patch) | |
| tree | 9ea2b494b09d04df81d14dee53e764865b90191d /cpus.c | |
| parent | cpus: kvm: unregister thread with RCU (diff) | |
| download | qemu-d2831ab065765c8af13a5bb42627150323a96662.tar.gz qemu-d2831ab065765c8af13a5bb42627150323a96662.tar.xz qemu-d2831ab065765c8af13a5bb42627150323a96662.zip | |
cpus: dummy: unregister thread with RCU, exit loop on unplug
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'cpus.c')
| -rw-r--r-- | cpus.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1234,7 +1234,7 @@ static void *qemu_dummy_cpu_thread_fn(void *arg) cpu->created = true; qemu_cond_signal(&qemu_cpu_cond); - while (1) { + do { qemu_mutex_unlock_iothread(); do { int sig; @@ -1246,8 +1246,9 @@ static void *qemu_dummy_cpu_thread_fn(void *arg) } qemu_mutex_lock_iothread(); qemu_wait_io_event(cpu); - } + } while (!cpu->unplug); + rcu_unregister_thread(); return NULL; #endif } |
