[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] docs/atomics.txt: Update pointer to linux macro
From: |
Marc-André Lureau |
Subject: |
Re: [Qemu-devel] [PATCH] docs/atomics.txt: Update pointer to linux macro |
Date: |
Tue, 12 Apr 2016 13:42:40 +0200 |
Hi
On Mon, Apr 11, 2016 at 7:30 PM, Pranith Kumar <address@hidden> wrote:
> Add a missing end brace and update doc to point to the latest access
> macro. ACCESS_ONE() is deprecated.
ONE/ONCE
>
> Signed-off-by: Pranith Kumar <address@hidden>
> ---
> docs/atomics.txt | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/docs/atomics.txt b/docs/atomics.txt
> index ef285e3..bba771e 100644
> --- a/docs/atomics.txt
> +++ b/docs/atomics.txt
> @@ -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)
I was going to send the same fix ;)
> typeof(*ptr) atomic_cmpxchg(ptr, old, new)
>
> all of which return the old value of *ptr. These operations are
> @@ -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).
>
That looks accurate to me, but I am not very familiar with these
> - most atomic read-modify-write operations in Linux return void;
why removing that line?
> in QEMU, all of them return the old value of the variable.
> --
> 2.8.1
>
>
--
Marc-André Lureau