diff options
| author | Adam Ierymenko <adam.ierymenko@zerotier.com> | 2013-08-12 16:18:35 -0400 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@zerotier.com> | 2013-08-12 16:18:35 -0400 |
| commit | 36af3d92ecb4148a74c14896f5b6a9dcea0c1700 (patch) | |
| tree | 0474c2add280ea6a33f25eff9bdf7ada7fe0c70d /node/Mutex.hpp | |
| parent | 2ad80063ec6e7d78d0d5b492f6065563792de05c (diff) | |
| download | infinitytier-36af3d92ecb4148a74c14896f5b6a9dcea0c1700.tar.gz infinitytier-36af3d92ecb4148a74c14896f5b6a9dcea0c1700.zip | |
Windows build work: condition, mutex, thread, udp socket...
Diffstat (limited to 'node/Mutex.hpp')
| -rw-r--r-- | node/Mutex.hpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/node/Mutex.hpp b/node/Mutex.hpp index 493cc425..b0130293 100644 --- a/node/Mutex.hpp +++ b/node/Mutex.hpp @@ -28,9 +28,10 @@ #ifndef _ZT_MUTEX_HPP
#define _ZT_MUTEX_HPP
+#include "Constants.hpp"
#include "NonCopyable.hpp"
-#if defined(__APPLE__) || defined(__linux__) || defined(linux) || defined(__LINUX__) || defined(__linux)
+#ifdef __UNIX_LIKE__
#include <stdlib.h>
#include <pthread.h>
@@ -112,7 +113,7 @@ private: #endif // Apple / Linux
-#ifdef _WIN32
+#ifdef __WINDOWS__
#include <stdlib.h>
#include <Windows.h>
@@ -157,9 +158,6 @@ public: (const_cast <Mutex *> (this))->unlock();
}
- /**
- * Uses C++ contexts and constructor/destructor to lock/unlock automatically
- */
class Lock : NonCopyable
{
public:
|
