]> git.saurik.com Git - apple/security.git/blobdiff - OSX/libsecurity_utilities/lib/seccfobject.h
Security-58286.260.20.tar.gz
[apple/security.git] / OSX / libsecurity_utilities / lib / seccfobject.h
index 26c392885c3f381b428c03d4f8c1180f3b42dcf7..0cbec6b16b45bf632e2a0196c155a7b074c7100a 100644 (file)
 #include <CoreFoundation/CFRuntime.h>
 #include <new>
 #include "threading.h"
+#include <os/lock.h>
+
+#if( __cplusplus <= 201103L)
 #include <stdatomic.h>
+#endif
 
 namespace Security {
 
@@ -79,7 +83,7 @@ private:
        static const size_t kAlignedRuntimeSize = SECALIGNUP(sizeof(SecRuntimeBase), 4);
 
     uint32_t mRetainCount;
-    OSSpinLock mRetainSpinLock;
+    os_unfair_lock mRetainLock;
 
 public:
        // For use by SecPointer only. Returns true once the first time it's called after the object has been created.