Blame SOURCES/kvm-atomic-update-documentation.patch

4a2fec
From be36671765f098deb41e032b40253967cbd50452 Mon Sep 17 00:00:00 2001
4a2fec
From: David Gibson <dgibson@redhat.com>
4a2fec
Date: Thu, 16 Nov 2017 03:07:12 +0100
4a2fec
Subject: [PATCH 08/30] atomic: update documentation
4a2fec
4a2fec
RH-Author: David Gibson <dgibson@redhat.com>
4a2fec
Message-id: <20171116030732.8560-3-dgibson@redhat.com>
4a2fec
Patchwork-id: 77692
4a2fec
O-Subject: [PATCH 02/22] atomic: update documentation
4a2fec
Bugzilla: 1481593
4a2fec
RH-Acked-by: Thomas Huth <thuth@redhat.com>
4a2fec
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
4a2fec
RH-Acked-by: Eduardo Habkost <ehabkost@redhat.com>
4a2fec
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
4a2fec
4a2fec
From: Paolo Bonzini <pbonzini@redhat.com>
4a2fec
4a2fec
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
4a2fec
(cherry picked from commit db81b9953761cac71906728fb3dfefce661ab903)
4a2fec
4a2fec
Signed-off-by: David Gibson <dgibson@redhat.com>
4a2fec
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
4a2fec
---
4a2fec
 docs/devel/atomics.txt | 13 ++++++++++++-
4a2fec
 1 file changed, 12 insertions(+), 1 deletion(-)
4a2fec
4a2fec
diff --git a/docs/devel/atomics.txt b/docs/devel/atomics.txt
4a2fec
index 3ef5d85..048e5f2 100644
4a2fec
--- a/docs/devel/atomics.txt
4a2fec
+++ b/docs/devel/atomics.txt
4a2fec
@@ -63,11 +63,22 @@ operations:
4a2fec
     typeof(*ptr) atomic_fetch_sub(ptr, val)
4a2fec
     typeof(*ptr) atomic_fetch_and(ptr, val)
4a2fec
     typeof(*ptr) atomic_fetch_or(ptr, val)
4a2fec
+    typeof(*ptr) atomic_fetch_xor(ptr, val)
4a2fec
     typeof(*ptr) atomic_xchg(ptr, val)
4a2fec
     typeof(*ptr) atomic_cmpxchg(ptr, old, new)
4a2fec
 
4a2fec
 all of which return the old value of *ptr.  These operations are
4a2fec
-polymorphic; they operate on any type that is as wide as an int.
4a2fec
+polymorphic; they operate on any type that is as wide as a pointer.
4a2fec
+
4a2fec
+Similar operations return the new value of *ptr:
4a2fec
+
4a2fec
+    typeof(*ptr) atomic_inc_fetch(ptr)
4a2fec
+    typeof(*ptr) atomic_dec_fetch(ptr)
4a2fec
+    typeof(*ptr) atomic_add_fetch(ptr, val)
4a2fec
+    typeof(*ptr) atomic_sub_fetch(ptr, val)
4a2fec
+    typeof(*ptr) atomic_and_fetch(ptr, val)
4a2fec
+    typeof(*ptr) atomic_or_fetch(ptr, val)
4a2fec
+    typeof(*ptr) atomic_xor_fetch(ptr, val)
4a2fec
 
4a2fec
 Sequentially consistent loads and stores can be done using:
4a2fec
 
4a2fec
-- 
4a2fec
1.8.3.1
4a2fec