File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
opal/include/opal/sys/gcc_builtin Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 15
15
* reserved.
16
16
* Copyright (c) 2016-2017 Research Organization for Information Science
17
17
* and Technology (RIST). All rights reserved.
18
+ * Copyright (c) 2018 Triad National Security, LLC. All rights
19
+ * reserved.
18
20
* $COPYRIGHT$
19
21
*
20
22
* Additional copyrights may follow
@@ -57,7 +59,14 @@ static inline void opal_atomic_mb(void)
57
59
58
60
static inline void opal_atomic_rmb (void )
59
61
{
62
+ #if OPAL_ASSEMBLY_ARCH == OPAL_X86_64
63
+ /* work around a bug in older gcc versions where ACQUIRE seems to get
64
+ * treated as a no-op instead of being equivalent to
65
+ * __asm__ __volatile__("": : :"memory") */
66
+ __atomic_thread_fence (__ATOMIC_SEQ_CST );
67
+ #else
60
68
__atomic_thread_fence (__ATOMIC_ACQUIRE );
69
+ #endif
61
70
}
62
71
63
72
static inline void opal_atomic_wmb (void )
You can’t perform that action at this time.
0 commit comments