]> git.proxmox.com Git - mirror_qemu.git/commit - util/thread-pool.c
threadpool: do not take lock in event_notifier_ready
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 31 Oct 2012 09:09:11 +0000 (10:09 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 31 Oct 2012 09:38:01 +0000 (10:38 +0100)
commit19d092cf9ba3c01b0e22ef65c499ae7ddc28d0e8
tree42531fcfcc0eebe598a900a8f0d9e5b289808abb
parentd354c7eccf5466ec2715a03d3f33dbfd6680dcc5
threadpool: do not take lock in event_notifier_ready

The ordering is:

    worker thread                         consumer thread
    -------------------------------------------------------------------
    write ret                             event_notifier_test_and_clear
    wmb()                                 read state
    write state                           rmb()
    event_notifier_set                    read ret

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
thread-pool.c