Browse Source

Fix build under macOS arm64

Closes #685
tags/v1.9.17
falkTX 4 years ago
parent
commit
1a81aa0ee1
1 changed files with 8 additions and 3 deletions
  1. +8
    -3
      macosx/JackAtomic_os.h

+ 8
- 3
macosx/JackAtomic_os.h View File

@@ -48,9 +48,7 @@ static inline int CAS(register UInt32 value, register UInt32 newvalue, register
return result; return result;
} }


#endif

#if defined(__i386__) || defined(__x86_64__)
#elif defined(__i386__) || defined(__x86_64__)


#define LOCK "lock ; " #define LOCK "lock ; "


@@ -67,6 +65,13 @@ static inline char CAS(volatile UInt32 value, UInt32 newvalue, volatile void* ad
return ret; return ret;
} }


#else

static inline char CAS(volatile UInt32 value, UInt32 newvalue, volatile void* addr)
{
return __sync_bool_compare_and_swap ((UInt32*)addr, value, newvalue);
}

#endif #endif


#endif #endif


Loading…
Cancel
Save