Skip to contentSkip to conversation

docs/atomics.txt: Update pointer to linux macro

PATCH In review Pranith Kumar 4 participants 6 messages Apr 11, 2016 – Apr 13, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 docs/atomics.txt: Update pointer to linux macro

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

---
 docs/atomics.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
docs/atomics.txt +2 -2
index ef285e3..bba771e 100644
@@ -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.
Signature · 1 line
2.8.1
#1 lore raw

Hi

Quoted 2 lines · Pranith Kumar

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

ONE/ONCE

Quoted 11 lines
---
 docs/atomics.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
docs/atomics.txt +0 -0
index ef285e3..bba771e 100644

docs/atomics.txt operations: · line 65

Quoted 5 lines
docs/atomics.txt +1 -1
@@ -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 ;)

docs/atomics.txt and memory barriers, and the equivalents in QEMU: · line 332

Quoted 10 lines
docs/atomics.txt +1 -1
     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

docs/atomics.txt and memory barriers, and the equivalents in QEMU: · line 333

Quoted 1 line
docs/atomics.txt +0 -0
 - most atomic read-modify-write operations in Linux return void;

why removing that line?

Quoted 5 lines
docs/atomics.txt +0 -1
   in QEMU, all of them return the old value of the variable.
--

2.8.1

Signature · 1 line
Marc-André Lureau
#2 lore raw
Quoted 9 lines · Marc-André Lureau

Hi

docs/atomics.txt and memory barriers, and the equivalents in QEMU: · line 331

Quoted 5 lines · Pranith Kumar

- atomic_read and atomic_set in Linux give no guarantee at all; atomic_read and atomic_set in QEMU include a compiler barrier

docs/atomics.txt +1 -1
-  (similar to the ACCESS_ONCE macro in Linux).
+  (similar to the READ_ONCE/WRITE_ONCE macros in Linux).
Quoted 5 lines

That looks accurate to me, but I am not very familiar with these

Quoted 1 line

- 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

#3 lore raw
In reply to Marc-André Lureau
Quoted 7 lines · Marc-André Lureau

Hi

Quoted 2 lines · Pranith Kumar

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,

Signature · 1 line
Pranith
#4 lore raw
Quoted 11 lines · Pranith Kumar
Quoted 7 lines · Marc-André Lureau

Hi

Quoted 2 lines · Pranith Kumar

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

#5 lore raw
Quoted 3 lines · Paolo Bonzini

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.

Signature · 1 line
Pranith