mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
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>
This commit is contained in:
parent
c170aad8b0
commit
ab28bd2312
5 changed files with 21 additions and 0 deletions
6
cpus.c
6
cpus.c
|
@ -954,6 +954,8 @@ static void *qemu_kvm_cpu_thread_fn(void *arg)
|
|||
CPUState *cpu = arg;
|
||||
int r;
|
||||
|
||||
rcu_register_thread();
|
||||
|
||||
qemu_mutex_lock_iothread();
|
||||
qemu_thread_get_self(cpu->thread);
|
||||
cpu->thread_id = qemu_get_thread_id();
|
||||
|
@ -995,6 +997,8 @@ static void *qemu_dummy_cpu_thread_fn(void *arg)
|
|||
sigset_t waitset;
|
||||
int r;
|
||||
|
||||
rcu_register_thread();
|
||||
|
||||
qemu_mutex_lock_iothread();
|
||||
qemu_thread_get_self(cpu->thread);
|
||||
cpu->thread_id = qemu_get_thread_id();
|
||||
|
@ -1034,6 +1038,8 @@ static void *qemu_tcg_cpu_thread_fn(void *arg)
|
|||
{
|
||||
CPUState *cpu = arg;
|
||||
|
||||
rcu_register_thread();
|
||||
|
||||
qemu_mutex_lock_iothread();
|
||||
qemu_tcg_init_cpu_signals();
|
||||
qemu_thread_get_self(cpu->thread);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue