OSDN Git Service
(root)
/
qmiga
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
57615ed
)
cpus: dummy: unregister thread with RCU, exit loop on unplug
author
Paolo Bonzini
<pbonzini@redhat.com>
Tue, 30 Jan 2018 16:04:53 +0000
(11:04 -0500)
committer
Paolo Bonzini
<pbonzini@redhat.com>
Wed, 7 Feb 2018 13:09:25 +0000
(14:09 +0100)
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
cpus.c
patch
|
blob
|
history
diff --git
a/cpus.c
b/cpus.c
index
1063dac
..
190ad5a
100644
(file)
--- a/
cpus.c
+++ b/
cpus.c
@@
-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
}