Skip to content

Commit 8dca246

Browse files
committed
Add a mfence to opal_atomic_mb() for x86.
x86 requires a mfence for it to be a full memory barrier; a compiler MB is not sufficient. Co-authored-by: George Katevenis <george_kate@hotmail.com> Signed-off-by: Austen Lauria <awlauria@us.ibm.com>
1 parent 25e0db6 commit 8dca246

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

opal/include/opal/sys/x86_64/atomic.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252

5353
static inline void opal_atomic_mb(void)
5454
{
55-
MB();
55+
__asm__ __volatile__("mfence": : :"memory");
5656
}
5757

5858
static inline void opal_atomic_rmb(void)

0 commit comments

Comments
 (0)