diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2013-02-22 17:36:25 +0100 |
---|---|---|
committer | Juan Quintela <quintela@redhat.com> | 2013-03-11 13:32:01 +0100 |
commit | 52e850dea988585c3d693fd9cd4a4c38968d89b8 (patch) | |
tree | e5fe8eb730492bdb8ca258f2be35f3e8a5dfad8b /include | |
parent | 323920c4eac01de74cf2b5e941c97ca9b2d36b7f (diff) | |
download | qemu-52e850dea988585c3d693fd9cd4a4c38968d89b8.zip qemu-52e850dea988585c3d693fd9cd4a4c38968d89b8.tar.gz qemu-52e850dea988585c3d693fd9cd4a4c38968d89b8.tar.bz2 |
block-migration: add lock
Some state is shared between the block migration code and its AIO
callbacks. Once block migration will run outside the iothread,
the block migration code and the AIO callbacks will be able to
run concurrently. Protect the critical sections with a separate
lock. Do the same for completed_sectors, which can be used from
the monitor.
Reviewed-by: Orit Wasserman <owasserm@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/qemu/atomic.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/qemu/atomic.h b/include/qemu/atomic.h index 96a194b..10becb6 100644 --- a/include/qemu/atomic.h +++ b/include/qemu/atomic.h @@ -16,6 +16,7 @@ */ #define smp_wmb() barrier() #define smp_rmb() barrier() + /* * We use GCC builtin if it's available, as that can use * mfence on 32 bit as well, e.g. if built with -march=pentium-m. |