]> git.proxmox.com Git - mirror_qemu.git/commit
atomic: base mb_read/mb_set on load-acquire and store-release
authorPaolo Bonzini <pbonzini@redhat.com>
Mon, 19 Sep 2016 09:36:44 +0000 (11:36 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 24 Oct 2016 13:27:15 +0000 (15:27 +0200)
commit803cf26a9e019b5d2256a8edeb22e3538c4f3261
treeaa9484da547aa37b2e345bd6b6a2d01621376d2a
parente11131b02584ddea93deef1caad8e4f945dd7340
atomic: base mb_read/mb_set on load-acquire and store-release

This introduces load-acquire and store-release operations in QEMU.
For now, just use them as an implementation detail of atomic_mb_read
and atomic_mb_set.

Since docs/atomics.txt documents that atomic_mb_read only synchronizes
with an atomic_mb_set of the same variable, we can use the new implementation
everywhere instead of seq-cst loads and stores.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
docs/atomics.txt
include/qemu/atomic.h