CMM_{STORE,LOAD}_SHARED() accept expressions. However,
uatomic_{load,store} accept address. To pass from the latter to the
former, a dereference is necessary.
Furthermore, the C11 compatibility layer for x86.h on store operations
was wrongly named after the `set' operation.
Change-Id: Icb1468de3de4878b5744e632314aa8332ad7fe26
Signed-off-by: Olivier Dion <odion@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
# define uatomic_store_mo(addr, v, mo) \
do { \
_cmm_compat_c11_smp_mb__before_mo(uatomic_store, mo); \
- (void) CMM_STORE_SHARED(addr, v); \
+ (void) CMM_STORE_SHARED(*(addr), v); \
_cmm_compat_c11_smp_mb__after_mo(uatomic_store, mo); \
} while (0)
# endif /* _CMM_TOOLCHAIN_SUPPORT_C11_MM */
__extension__ \
({ \
_cmm_compat_c11_smp_mb__before_mo(uatomic_load, mo); \
- __typeof__(*(addr)) _rcu_value = CMM_LOAD_SHARED(addr); \
+ __typeof__(*(addr)) _rcu_value = CMM_LOAD_SHARED(*(addr)); \
_cmm_compat_c11_smp_mb__after_mo(uatomic_load, mo); \
\
_rcu_value; \
}
}
-static inline void _cmm_compat_c11_smp_mb__before_uatomic_set_mo(enum cmm_memorder mo)
+static inline void _cmm_compat_c11_smp_mb__before_uatomic_store_mo(enum cmm_memorder mo)
{
/*
* A SMP barrier is not necessary for CMM_SEQ_CST because the store can
}
}
-static inline void _cmm_compat_c11_smp_mb__after_uatomic_set_mo(enum cmm_memorder mo)
+static inline void _cmm_compat_c11_smp_mb__after_uatomic_store_mo(enum cmm_memorder mo)
{
/*
* A SMP barrier is necessary for CMM_SEQ_CST because the store can be