File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
opal/include/opal/sys/gcc_builtin Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change 50
50
#define OPAL_HAVE_ATOMIC_SUB_64 1
51
51
#define OPAL_HAVE_ATOMIC_SWAP_64 1
52
52
53
+ #if (OPAL_ASSEMBLY_ARCH == OPAL_X86_64 ) && defined (__GNUC__ ) && !defined(__llvm ) && (__GNUC__ < 6 )
54
+ /* work around a bug in older gcc versions where ACQUIRE seems to get
55
+ * treated as a no-op instead */
56
+ #define OPAL_BUSTED_ATOMIC_MB 1
57
+ #else
58
+ #define OPAL_BUSTED_ATOMIC_MB 0
59
+ #endif
60
+
53
61
static inline void opal_atomic_mb (void )
54
62
{
55
63
__atomic_thread_fence (__ATOMIC_SEQ_CST );
56
64
}
57
65
58
66
static inline void opal_atomic_rmb (void )
59
67
{
60
- #if OPAL_ASSEMBLY_ARCH == OPAL_X86_64
61
- /* work around a bug in older gcc versions where ACQUIRE seems to get
62
- * treated as a no-op instead */
68
+ #if OPAL_BUSTED_ATOMIC_MB
63
69
__asm__ __volatile__("" : : : "memory" );
64
70
#else
65
71
__atomic_thread_fence (__ATOMIC_ACQUIRE );
You can’t perform that action at this time.
0 commit comments