Skip to contentSkip to conversation

cpus: remove useless cond signal

PATCH In review linzhecheng 2 participants 2 messages May 14, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cpus: remove useless cond signal

commit dbadee4 removed qemu_cond_wait in cpu_remove_sync, so it is useless to keep qemu_cond_signal here.

cpus.c +0 -1
index 5bcd3ecf38..c7262484f3 100644
@@ -1222,7 +1222,6 @@ static void *qemu_kvm_cpu_thread_fn(void *arg)
 
     qemu_kvm_destroy_vcpu(cpu);
     cpu->created = false;
-    qemu_cond_signal(&qemu_cpu_cond);
     qemu_mutex_unlock_iothread();
     rcu_unregister_thread();
     return NULL;
Signature · 1 line
2.12.2.windows.2
#1 lore raw
Quoted 18 lines · linzhecheng

commit dbadee4 removed qemu_cond_wait in cpu_remove_sync, so it is useless to keep qemu_cond_signal here.

cpus.c +0 -2
index 5bcd3ecf38..c7262484f3 100644
@@ -1222,7 +1222,6 @@ static void *qemu_kvm_cpu_thread_fn(void *arg)
 
     qemu_kvm_destroy_vcpu(cpu);
     cpu->created = false;
-    qemu_cond_signal(&qemu_cpu_cond);
     qemu_mutex_unlock_iothread();
     rcu_unregister_thread();
     return NULL;
--
Quoted 1 line

2.12.2.windows.2

At the moment we seem to have an invariant "everywhere we set cpu->created = false we also signal the qemu_cpu_cond". If signalling the condition is no longer necessary in this function, is it also no longer necessary in all the other places where we do it after setting created = false ?

thanks
-- PMM