aboutsummaryrefslogtreecommitdiff
path: root/source/Host/common/Mutex.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/Host/common/Mutex.cpp')
-rw-r--r--source/Host/common/Mutex.cpp26
1 files changed, 16 insertions, 10 deletions
diff --git a/source/Host/common/Mutex.cpp b/source/Host/common/Mutex.cpp
index 39cd8c6adb4e..4e0135535628 100644
--- a/source/Host/common/Mutex.cpp
+++ b/source/Host/common/Mutex.cpp
@@ -10,9 +10,11 @@
#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>
#if 0
// This logging is way too verbose to enable even for a log channel.
@@ -177,6 +179,8 @@ Mutex::Locker::TryLock (Mutex &mutex, const char *failure_message)
return m_mutex_ptr != NULL;
}
+#ifndef _WIN32
+
//----------------------------------------------------------------------
// Default constructor.
//
@@ -253,15 +257,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 +336,17 @@ Mutex::Unlock()
return err;
}
+#endif
+
+//----------------------------------------------------------------------
+// Mutex get accessor.
+//----------------------------------------------------------------------
+lldb::mutex_t *
+Mutex::GetMutex()
+{
+ return &m_mutex;
+}
+
#ifdef LLDB_CONFIGURATION_DEBUG
int
TrackingMutex::Unlock ()