]> git.tdb.fi Git - libs/core.git/blobdiff - source/core/mutex_private.h
Refactor Mutex with pimpl
[libs/core.git] / source / core / mutex_private.h
diff --git a/source/core/mutex_private.h b/source/core/mutex_private.h
new file mode 100644 (file)
index 0000000..0b092da
--- /dev/null
@@ -0,0 +1,24 @@
+#ifndef MSP_CORE_MUTEX_PRIVATE_H_
+#define MSP_CORE_MUTEX_PRIVATE_H_
+
+#ifdef WIN32
+#include <windows.h>
+#else
+#include <pthread.h>
+#endif
+#include "mutex.h"
+
+namespace Msp {
+
+struct Mutex::Private
+{
+#ifdef WIN32
+       CRITICAL_SECTION crit;
+#else
+       pthread_mutex_t mutex;
+#endif
+};
+
+} // namespace Msp
+
+#endif