From 2bab15f431bec4ba5f10238e6f578ab2653ea675 Mon Sep 17 00:00:00 2001 From: "Hoa V. DINH" Date: Fri, 23 Jan 2015 00:46:41 -0800 Subject: Use spinlock --- src/core/basetypes/MCObject.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/core/basetypes/MCObject.h') diff --git a/src/core/basetypes/MCObject.h b/src/core/basetypes/MCObject.h index 95446f61..83d6c1a7 100644 --- a/src/core/basetypes/MCObject.h +++ b/src/core/basetypes/MCObject.h @@ -5,6 +5,7 @@ #include #if __APPLE__ #include +#include #endif #include @@ -56,7 +57,11 @@ namespace mailcore { public: // private private: +#if __APPLE__ + OSSpinLock mLock; +#else pthread_mutex_t mLock; +#endif int mCounter; void init(); static void initObjectConstructors(); -- cgit v1.2.3