Skip to content

Commit 5571dba

Browse files
authored
Merge pull request #10721 from devreal/gcc_atomic_fixes
Atomics: several fixes the GCC backend
2 parents 96fadd9 + 521062c commit 5571dba

File tree

1 file changed

+2
-2
lines changed
  • opal/include/opal/sys/gcc_builtin

1 file changed

+2
-2
lines changed

opal/include/opal/sys/gcc_builtin/atomic.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
*
3737
*********************************************************************/
3838

39-
#if defined(PLATFORM_ARCH_X86_64) && defined (__GNUC__) && !defined(__llvm) && (__GNUC__ < 6)
39+
#if defined(PLATFORM_ARCH_X86_64) && defined(PLATFORM_COMPILER_GNU) && __GNUC__ < 8
4040
/* work around a bug in older gcc versions where ACQUIRE seems to get
4141
* treated as a no-op instead */
4242
#define OPAL_BUSTED_ATOMIC_MB 1
@@ -193,7 +193,7 @@ static inline intptr_t opal_atomic_swap_ptr(opal_atomic_intptr_t *addr, intptr_t
193193

194194
static inline void opal_atomic_lock_init(opal_atomic_lock_t *lock, int32_t value)
195195
{
196-
lock = value;
196+
*lock = value;
197197
}
198198

199199
static inline int opal_atomic_trylock(opal_atomic_lock_t *lock)

0 commit comments

Comments
 (0)