Skip to content

Commit bf5fb5b

Browse files
authored
Merge pull request #6500 from nysal/spinlock_fix
opal/atomics: Add acquire semantics back for spinlocks
2 parents 5111dbd + 00f27a8 commit bf5fb5b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

opal/include/opal/sys/atomic_impl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ static inline int
495495
opal_atomic_trylock(opal_atomic_lock_t *lock)
496496
{
497497
int32_t unlocked = OPAL_ATOMIC_LOCK_UNLOCKED;
498-
bool ret = opal_atomic_compare_exchange_strong_32 (&lock->u.lock, &unlocked, OPAL_ATOMIC_LOCK_LOCKED);
498+
bool ret = opal_atomic_compare_exchange_strong_acq_32 (&lock->u.lock, &unlocked, OPAL_ATOMIC_LOCK_LOCKED);
499499
return (ret == false) ? 1 : 0;
500500
}
501501

0 commit comments

Comments
 (0)