summaryrefslogtreecommitdiffstats
path: root/include/qemu/atomic.h
diff options
context:
space:
mode:
authorTimothy Pearson <tpearson@raptorengineering.com>2019-11-29 19:25:14 -0600
committerTimothy Pearson <tpearson@raptorengineering.com>2019-11-29 19:25:14 -0600
commitd7b5e291ffb166239c44682af2363080c72888aa (patch)
tree226ff4668e6e5fd9309d792181bb54e256032338 /include/qemu/atomic.h
parenta8c40fa2d667e585382080db36ac44e216b37a1c (diff)
downloadhqemu-d7b5e291ffb166239c44682af2363080c72888aa.zip
hqemu-d7b5e291ffb166239c44682af2363080c72888aa.tar.gz
Initial overlay of HQEMU 2.5.2 changes onto underlying 2.5.0 QEMU GIT tree2.5_overlay
Diffstat (limited to 'include/qemu/atomic.h')
-rw-r--r--include/qemu/atomic.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/qemu/atomic.h b/include/qemu/atomic.h
index bd2c075..e2125bd 100644
--- a/include/qemu/atomic.h
+++ b/include/qemu/atomic.h
@@ -158,13 +158,13 @@
#ifndef atomic_rcu_read
#ifdef __ATOMIC_CONSUME
#define atomic_rcu_read(ptr) ({ \
- typeof(*ptr) _val; \
+ __typeof__(*ptr) _val; \
__atomic_load(ptr, &_val, __ATOMIC_CONSUME); \
_val; \
})
#else
#define atomic_rcu_read(ptr) ({ \
- typeof(*ptr) _val = atomic_read(ptr); \
+ __typeof__(*ptr) _val = atomic_read(ptr); \
smp_read_barrier_depends(); \
_val; \
})
@@ -185,7 +185,7 @@
#ifndef atomic_rcu_set
#ifdef __ATOMIC_RELEASE
#define atomic_rcu_set(ptr, i) do { \
- typeof(*ptr) _val = (i); \
+ __typeof__(*ptr) _val = (i); \
__atomic_store(ptr, &_val, __ATOMIC_RELEASE); \
} while(0)
#else
@@ -220,7 +220,7 @@
*/
#ifndef atomic_mb_read
#define atomic_mb_read(ptr) ({ \
- typeof(*ptr) _val = atomic_read(ptr); \
+ __typeof__(*ptr) _val = atomic_read(ptr); \
smp_rmb(); \
_val; \
})
@@ -239,7 +239,7 @@
#define atomic_xchg(ptr, i) __sync_swap(ptr, i)
#elif defined(__ATOMIC_SEQ_CST)
#define atomic_xchg(ptr, i) ({ \
- typeof(*ptr) _new = (i), _old; \
+ __typeof__(*ptr) _new = (i), _old; \
__atomic_exchange(ptr, &_new, &_old, __ATOMIC_SEQ_CST); \
_old; \
})
OpenPOWER on IntegriCloud