--- src/ptex/PtexPlatform.h.orig 2018-04-10 15:47:40.000000000 -0700 +++ src/ptex/PtexPlatform.h 2018-11-02 09:28:24.000000000 -0700 @@ -67,7 +67,7 @@ #include #ifdef __APPLE__ -#include +#include #include #endif #endif @@ -136,13 +136,13 @@ #ifdef __APPLE__ class SpinLock { public: - SpinLock() { _spinlock = OS_UNFAIR_LOCK_INIT; } + SpinLock() { _spinlock = 0; } ~SpinLock() { } - void lock() { os_unfair_lock_lock(&_spinlock); } - bool trylock() { return os_unfair_lock_trylock(&_spinlock); } - void unlock() { os_unfair_lock_unlock(&_spinlock); } + void lock() { OSSpinLockLock(&_spinlock); } + bool trylock() { return OSSpinLockTry(&_spinlock); } + void unlock() { OSSpinLockUnlock(&_spinlock); } private: - os_unfair_lock _spinlock; + OSSpinLock _spinlock; }; #else class SpinLock {