aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/basetypes/MCObject.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/basetypes/MCObject.h')
-rw-r--r--src/core/basetypes/MCObject.h5
1 files changed, 5 insertions, 0 deletions
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 <pthread.h>
#if __APPLE__
#include <dispatch/dispatch.h>
+#include <libkern/OSAtomic.h>
#endif
#include <MailCore/MCUtils.h>
@@ -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();