mirror of https://github.com/proxmox/mirror_qemu
cpus: dummy: unregister thread with RCU, exit loop on unplug
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>master
parent
57615ed56c
commit
d2831ab065
5
cpus.c
5
cpus.c
|
@ -1234,7 +1234,7 @@ static void *qemu_dummy_cpu_thread_fn(void *arg)
|
||||||
cpu->created = true;
|
cpu->created = true;
|
||||||
qemu_cond_signal(&qemu_cpu_cond);
|
qemu_cond_signal(&qemu_cpu_cond);
|
||||||
|
|
||||||
while (1) {
|
do {
|
||||||
qemu_mutex_unlock_iothread();
|
qemu_mutex_unlock_iothread();
|
||||||
do {
|
do {
|
||||||
int sig;
|
int sig;
|
||||||
|
@ -1246,8 +1246,9 @@ static void *qemu_dummy_cpu_thread_fn(void *arg)
|
||||||
}
|
}
|
||||||
qemu_mutex_lock_iothread();
|
qemu_mutex_lock_iothread();
|
||||||
qemu_wait_io_event(cpu);
|
qemu_wait_io_event(cpu);
|
||||||
}
|
} while (!cpu->unplug);
|
||||||
|
|
||||||
|
rcu_unregister_thread();
|
||||||
return NULL;
|
return NULL;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue