Skip to content

Commit

Permalink
docs/atomics.txt: Update pointer to linux macro
Browse files Browse the repository at this point in the history
Add a missing end brace and update doc to point to the latest access
macro. ACCESS_ONCE() is deprecated.

Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
Message-Id: <1462198852-28694-1-git-send-email-bobby.prani@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
  • Loading branch information
pranith authored and bonzini committed May 23, 2016
1 parent d2f39ad commit dfc007f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/atomics.txt
Expand Up @@ -62,7 +62,7 @@ operations:
typeof(*ptr) atomic_fetch_sub(ptr, val)
typeof(*ptr) atomic_fetch_and(ptr, val)
typeof(*ptr) atomic_fetch_or(ptr, val)
typeof(*ptr) atomic_xchg(ptr, val
typeof(*ptr) atomic_xchg(ptr, val)
typeof(*ptr) atomic_cmpxchg(ptr, old, new)

all of which return the old value of *ptr. These operations are
Expand Down Expand Up @@ -328,7 +328,7 @@ and memory barriers, and the equivalents in QEMU:

- atomic_read and atomic_set in Linux give no guarantee at all;
atomic_read and atomic_set in QEMU include a compiler barrier
(similar to the ACCESS_ONCE macro in Linux).
(similar to the READ_ONCE/WRITE_ONCE macros in Linux).

- most atomic read-modify-write operations in Linux return void;
in QEMU, all of them return the old value of the variable.
Expand Down

0 comments on commit dfc007f

Please sign in to comment.