X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/0a7de7458d150b5d4dffc935ba399be265ef0a1a..eb6b6ca394357805f2bdba989abae309f718b4d8:/libkern/libclosure/runtime.cpp diff --git a/libkern/libclosure/runtime.cpp b/libkern/libclosure/runtime.cpp index 95bf5a48c..4ae5cd977 100644 --- a/libkern/libclosure/runtime.cpp +++ b/libkern/libclosure/runtime.cpp @@ -26,6 +26,7 @@ #endif /* KERNEL */ +#include #include #include #ifndef os_assumes @@ -54,8 +55,8 @@ OSAtomicCompareAndSwapInt(int oldi, int newi, int volatile *dst) return original == oldi; } #else -#define OSAtomicCompareAndSwapLong(_Old, _New, _Ptr) __sync_bool_compare_and_swap(_Ptr, _Old, _New) -#define OSAtomicCompareAndSwapInt(_Old, _New, _Ptr) __sync_bool_compare_and_swap(_Ptr, _Old, _New) +#define OSAtomicCompareAndSwapLong(_Old, _New, _Ptr) os_atomic_cmpxchg(_Ptr, _Old, _New, relaxed) +#define OSAtomicCompareAndSwapInt(_Old, _New, _Ptr) os_atomic_cmpxchg(_Ptr, _Old, _New, relaxed) #endif