diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2016-09-19 11:36:44 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2016-10-24 15:27:15 +0200 |
commit | 803cf26a9e019b5d2256a8edeb22e3538c4f3261 (patch) | |
tree | aa9484da547aa37b2e345bd6b6a2d01621376d2a /docs | |
parent | e11131b02584ddea93deef1caad8e4f945dd7340 (diff) | |
download | qemu-803cf26a9e019b5d2256a8edeb22e3538c4f3261.zip |
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>
Diffstat (limited to 'docs')
-rw-r--r-- | docs/atomics.txt | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/docs/atomics.txt b/docs/atomics.txt index c8e4cbec06..3ef5d85b1b 100644 --- a/docs/atomics.txt +++ b/docs/atomics.txt @@ -374,8 +374,9 @@ and memory barriers, and the equivalents in QEMU: note that smp_store_mb() is a little weaker than atomic_mb_set(). atomic_mb_read() compiles to the same instructions as Linux's smp_load_acquire(), but this should be treated as an implementation - detail. If required, QEMU might later add atomic_load_acquire() and - atomic_store_release() macros. + detail. QEMU does have atomic_load_acquire() and atomic_store_release() + macros, but for now they are only used within atomic.h. This may + change in the future. SOURCES |