{
gint32 count;
do {
- count = mono_atomic_load_acquire (gint32, &data->refcount);
+ mono_atomic_load_acquire (count, gint32, &data->refcount);
g_assert (count >= 1 && count <= 2);
if (count == 1) {
g_free (data);
__tmp = *target; \
__tmp; })
-#define mono_atomic_load_acquire(_type,target) ({ \
+#define mono_atomic_load_acquire(var,_type,target) do { \
_type __tmp = *target; \
LOAD_ACQUIRE_FENCE; \
- __tmp; })
+ (var) = __tmp; \
+} while (0)
#define mono_atomic_store_acquire(target,value) { \
*target = value; \