diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2015-07-09 08:55:38 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2015-07-24 13:57:45 +0200 |
commit | ab28bd23125fb4a0411c3a3f01c4edacbc261486 (patch) | |
tree | 50cf40b9f83a43d2a7b6dee4a801e6c31fc409ee /iothread.c | |
parent | c170aad8b057223b1139d72e5ce7acceafab4fa9 (diff) | |
download | qemu-ab28bd23125fb4a0411c3a3f01c4edacbc261486.tar.gz |
rcu: actually register threads that have RCU read-side critical sections
Otherwise, grace periods are detected too early!
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'iothread.c')
-rw-r--r-- | iothread.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/iothread.c b/iothread.c index 6d2a33faf9..da6ce7b308 100644 --- a/iothread.c +++ b/iothread.c @@ -18,6 +18,7 @@ #include "sysemu/iothread.h" #include "qmp-commands.h" #include "qemu/error-report.h" +#include "qemu/rcu.h" typedef ObjectClass IOThreadClass; @@ -31,6 +32,8 @@ static void *iothread_run(void *opaque) IOThread *iothread = opaque; bool blocking; + rcu_register_thread(); + qemu_mutex_lock(&iothread->init_done_lock); iothread->thread_id = qemu_get_thread_id(); qemu_cond_signal(&iothread->init_done_cond); @@ -45,6 +48,8 @@ static void *iothread_run(void *opaque) } aio_context_release(iothread->ctx); } + + rcu_unregister_thread(); return NULL; } |