All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] docs/atomics.txt: Update pointer to linux macro
@ 2016-04-11 17:30 Pranith Kumar
  2016-04-12 11:42 ` Marc-André Lureau
  0 siblings, 1 reply; 7+ messages in thread
From: Pranith Kumar @ 2016-04-11 17:30 UTC (permalink / raw)
  To: pbonzini; +Cc: qemu-devel

Add a missing end brace and update doc to point to the latest access
macro. ACCESS_ONE() is deprecated.

Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
---
 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)
     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).
 
 - most atomic read-modify-write operations in Linux return void;
   in QEMU, all of them return the old value of the variable.
-- 
2.8.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [PATCH] docs/atomics.txt: Update pointer to linux macro
  2016-04-11 17:30 [Qemu-devel] [PATCH] docs/atomics.txt: Update pointer to linux macro Pranith Kumar
@ 2016-04-12 11:42 ` Marc-André Lureau
  2016-04-12 11:47   ` Peter Maydell
  2016-04-12 16:08   ` Pranith Kumar
  0 siblings, 2 replies; 7+ messages in thread
From: Marc-André Lureau @ 2016-04-12 11:42 UTC (permalink / raw)
  To: Pranith Kumar; +Cc: Paolo Bonzini, QEMU

Hi

On Mon, Apr 11, 2016 at 7:30 PM, Pranith Kumar <bobby.prani@gmail.com> 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 <bobby.prani@gmail.com>
> ---
>  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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [PATCH] docs/atomics.txt: Update pointer to linux macro
  2016-04-12 11:42 ` Marc-André Lureau
@ 2016-04-12 11:47   ` Peter Maydell
  2016-04-12 16:08   ` Pranith Kumar
  1 sibling, 0 replies; 7+ messages in thread
From: Peter Maydell @ 2016-04-12 11:47 UTC (permalink / raw)
  To: Marc-André Lureau; +Cc: Pranith Kumar, Paolo Bonzini, QEMU

On 12 April 2016 at 12:42, Marc-André Lureau <marcandre.lureau@gmail.com> wrote:
> Hi
>
> On Mon, Apr 11, 2016 at 7:30 PM, Pranith Kumar <bobby.prani@gmail.com> wrote:
>>  - 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?

Count the spaces :-)   It's a line of context which happens to start
with a "-" character, not a line being removed.

thanks
-- PMM

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [PATCH] docs/atomics.txt: Update pointer to linux macro
  2016-04-12 11:42 ` Marc-André Lureau
  2016-04-12 11:47   ` Peter Maydell
@ 2016-04-12 16:08   ` Pranith Kumar
  2016-04-12 21:20     ` Paolo Bonzini
  1 sibling, 1 reply; 7+ messages in thread
From: Pranith Kumar @ 2016-04-12 16:08 UTC (permalink / raw)
  To: Marc-André Lureau; +Cc: Paolo Bonzini, QEMU

On Tue, Apr 12, 2016 at 7:42 AM, Marc-André Lureau
<marcandre.lureau@gmail.com> wrote:
> Hi
>
> On Mon, Apr 11, 2016 at 7:30 PM, Pranith Kumar <bobby.prani@gmail.com> wrote:
>> Add a missing end brace and update doc to point to the latest access
>> macro. ACCESS_ONE() is deprecated.
>
> ONE/ONCE

Right, I missed this one. Should I fix and send a new patch?

Thanks,
-- 
Pranith

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [PATCH] docs/atomics.txt: Update pointer to linux macro
  2016-04-12 16:08   ` Pranith Kumar
@ 2016-04-12 21:20     ` Paolo Bonzini
  2016-04-13  3:50       ` Pranith Kumar
  0 siblings, 1 reply; 7+ messages in thread
From: Paolo Bonzini @ 2016-04-12 21:20 UTC (permalink / raw)
  To: Pranith Kumar, Marc-André Lureau; +Cc: QEMU



On 12/04/2016 18:08, Pranith Kumar wrote:
> On Tue, Apr 12, 2016 at 7:42 AM, Marc-André Lureau
> <marcandre.lureau@gmail.com> wrote:
>> Hi
>>
>> On Mon, Apr 11, 2016 at 7:30 PM, Pranith Kumar <bobby.prani@gmail.com> wrote:
>>> Add a missing end brace and update doc to point to the latest access
>>> macro. ACCESS_ONE() is deprecated.
>>
>> ONE/ONCE
> 
> Right, I missed this one. Should I fix and send a new patch?

FWIW I'll be mostly offline this week and on vacation starting from the
next, so it's probably best if you send the patch at the beginning of
May.  It will be fixed _and_ act as a reminder. :)

Paolo

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [PATCH] docs/atomics.txt: Update pointer to linux macro
  2016-04-12 21:20     ` Paolo Bonzini
@ 2016-04-13  3:50       ` Pranith Kumar
  0 siblings, 0 replies; 7+ messages in thread
From: Pranith Kumar @ 2016-04-13  3:50 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: Marc-André Lureau, QEMU

On Tue, Apr 12, 2016 at 5:20 PM, Paolo Bonzini <pbonzini@redhat.com> wrote:

> FWIW I'll be mostly offline this week and on vacation starting from the
> next, so it's probably best if you send the patch at the beginning of
> May.  It will be fixed _and_ act as a reminder. :)

Sure, I will do so in May.

-- 
Pranith

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Qemu-devel] [PATCH] docs/atomics.txt: Update pointer to linux macro
@ 2016-05-02 14:20 Pranith Kumar
  0 siblings, 0 replies; 7+ messages in thread
From: Pranith Kumar @ 2016-05-02 14:20 UTC (permalink / raw)
  To: pbonzini, marcandre.lureau, open list:All patches CC here; +Cc: alex.bennee

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>
---
 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)
     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).
 
 - most atomic read-modify-write operations in Linux return void;
   in QEMU, all of them return the old value of the variable.
-- 
2.8.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-05-02 14:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-11 17:30 [Qemu-devel] [PATCH] docs/atomics.txt: Update pointer to linux macro Pranith Kumar
2016-04-12 11:42 ` Marc-André Lureau
2016-04-12 11:47   ` Peter Maydell
2016-04-12 16:08   ` Pranith Kumar
2016-04-12 21:20     ` Paolo Bonzini
2016-04-13  3:50       ` Pranith Kumar
2016-05-02 14:20 Pranith Kumar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.