qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v1 1/2] Extend header file for atomic operations
@ 2014-09-01  8:58 Chrysostomos Nanakos
  2014-09-01  8:58 ` [Qemu-devel] [PATCH v1 2/2] block/archipelago: Use QEMU atomic builtins Chrysostomos Nanakos
  0 siblings, 1 reply; 6+ messages in thread
From: Chrysostomos Nanakos @ 2014-09-01  8:58 UTC (permalink / raw)
  To: qemu-devel; +Cc: kwolf, pbonzini, Chrysostomos Nanakos, stefanha

Add __sync_*_and_fetch builtins used in several places.

Signed-off-by: Chrysostomos Nanakos <cnanakos@grnet.gr>
---
 include/qemu/atomic.h |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/qemu/atomic.h b/include/qemu/atomic.h
index 492bce1..48fc283 100644
--- a/include/qemu/atomic.h
+++ b/include/qemu/atomic.h
@@ -189,6 +189,10 @@
 #define atomic_fetch_sub       __sync_fetch_and_sub
 #define atomic_fetch_and       __sync_fetch_and_and
 #define atomic_fetch_or        __sync_fetch_and_or
+#define atomic_add_fetch       __sync_add_and_fetch
+#define atomic_sub_fetch       __sync_sub_and_fetch
+#define atomic_or_fetch        __sync_or_and_fetch
+#define atomic_and_fetch       __sync_and_and_fetch
 #define atomic_cmpxchg         __sync_val_compare_and_swap
 
 /* And even shorter names that return void.  */
-- 
1.7.10.4

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

end of thread, other threads:[~2014-09-01 10:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-01  8:58 [Qemu-devel] [PATCH v1 1/2] Extend header file for atomic operations Chrysostomos Nanakos
2014-09-01  8:58 ` [Qemu-devel] [PATCH v1 2/2] block/archipelago: Use QEMU atomic builtins Chrysostomos Nanakos
2014-09-01  9:43   ` Paolo Bonzini
2014-09-01 10:13     ` Chrysostomos Nanakos
2014-09-01 10:33       ` Paolo Bonzini
2014-09-01 10:39         ` Chrysostomos Nanakos

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).