File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
opal/mca/pmix/pmix112/pmix/src/atomics/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 1717 * and Technology (RIST). All rights reserved.
1818 * Copyright (c) 2017 Intel, Inc. All rights reserved.
1919 * Copyright (c) 2017 IBM Corporation. All rights reserved.
20+ * Copyright (c) 2018 Triad National Security, LLC. All rights
21+ * reserved.
2022 * $COPYRIGHT$
2123 *
2224 * Additional copyrights may follow
@@ -55,7 +57,14 @@ static inline void pmix_atomic_mb(void)
5557
5658static inline void pmix_atomic_rmb (void )
5759{
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 of being equivalent to
63+ * __asm__ __volatile__("": : :"memory") */
64+ __atomic_thread_fence (__ATOMIC_SEQ_CST );
65+ #else
5866 __atomic_thread_fence (__ATOMIC_ACQUIRE );
67+ #endif
5968}
6069
6170static inline void pmix_atomic_wmb (void )
You can’t perform that action at this time.
0 commit comments