summaryrefslogtreecommitdiffstats
path: root/lldb/source/Host/common/Mutex.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Host/common/Mutex.cpp')
-rw-r--r--lldb/source/Host/common/Mutex.cpp25
1 files changed, 16 insertions, 9 deletions
diff --git a/lldb/source/Host/common/Mutex.cpp b/lldb/source/Host/common/Mutex.cpp
index 39cd8c6adb4..3733100d6fd 100644
--- a/lldb/source/Host/common/Mutex.cpp
+++ b/lldb/source/Host/common/Mutex.cpp
@@ -10,6 +10,9 @@
#include "lldb/Host/Mutex.h"
#include "lldb/Host/Host.h"
+#ifndef _WIN32
+#include <pthread.h>
+#endif
#include <string.h>
#include <stdio.h>
#include <unistd.h>
@@ -177,6 +180,8 @@ Mutex::Locker::TryLock (Mutex &mutex, const char *failure_message)
return m_mutex_ptr != NULL;
}
+#ifndef _WIN32
+
//----------------------------------------------------------------------
// Default constructor.
//
@@ -253,15 +258,6 @@ Mutex::~Mutex()
}
//----------------------------------------------------------------------
-// Mutex get accessor.
-//----------------------------------------------------------------------
-pthread_mutex_t *
-Mutex::GetMutex()
-{
- return &m_mutex;
-}
-
-//----------------------------------------------------------------------
// Locks the mutex owned by this object, if the mutex is already
// locked, the calling thread will block until the mutex becomes
// available.
@@ -341,6 +337,17 @@ Mutex::Unlock()
return err;
}
+#endif
+
+//----------------------------------------------------------------------
+// Mutex get accessor.
+//----------------------------------------------------------------------
+lldb::mutex_t *
+Mutex::GetMutex()
+{
+ return &m_mutex;
+}
+
#ifdef LLDB_CONFIGURATION_DEBUG
int
TrackingMutex::Unlock ()
OpenPOWER on IntegriCloud