Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions opal/include/opal/sys/gcc_builtin/atomic.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
* reserved.
* Copyright (c) 2016 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* Copyright (c) 2018 Triad National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
Expand Down Expand Up @@ -53,7 +55,14 @@ static inline void opal_atomic_mb(void)

static inline void opal_atomic_rmb(void)
{
#if OPAL_ASSEMBLY_ARCH == OPAL_X86_64
/* work around a bug in older gcc versions where ACQUIRE seems to get
* treated as a no-op instead of being equivalent to
* __asm__ __volatile__("": : :"memory") */
__atomic_thread_fence (__ATOMIC_SEQ_CST);
#else
__atomic_thread_fence (__ATOMIC_ACQUIRE);
#endif
}

static inline void opal_atomic_wmb(void)
Expand Down