[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v1 1/2] Extend header file for atomic operations
From: |
Chrysostomos Nanakos |
Subject: |
[Qemu-devel] [PATCH v1 1/2] Extend header file for atomic operations |
Date: |
Mon, 1 Sep 2014 11:58:40 +0300 |
Add __sync_*_and_fetch builtins used in several places.
Signed-off-by: Chrysostomos Nanakos <address@hidden>
---
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
- [Qemu-devel] [PATCH v1 1/2] Extend header file for atomic operations,
Chrysostomos Nanakos <=