summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/tools/lldb/source/Host/common/Condition.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm/tools/lldb/source/Host/common/Condition.cpp')
-rw-r--r--contrib/llvm/tools/lldb/source/Host/common/Condition.cpp27
1 files changed, 17 insertions, 10 deletions
diff --git a/contrib/llvm/tools/lldb/source/Host/common/Condition.cpp b/contrib/llvm/tools/lldb/source/Host/common/Condition.cpp
index daa729c..7bc6b65 100644
--- a/contrib/llvm/tools/lldb/source/Host/common/Condition.cpp
+++ b/contrib/llvm/tools/lldb/source/Host/common/Condition.cpp
@@ -15,6 +15,8 @@
using namespace lldb_private;
+#ifndef _WIN32
+
//----------------------------------------------------------------------
// Default constructor
//
@@ -47,15 +49,6 @@ Condition::Broadcast ()
}
//----------------------------------------------------------------------
-// Get accessor to the pthread condition object
-//----------------------------------------------------------------------
-pthread_cond_t *
-Condition::GetCondition ()
-{
- return &m_condition;
-}
-
-//----------------------------------------------------------------------
// Unblocks one thread waiting for the condition variable
//----------------------------------------------------------------------
int
@@ -64,6 +57,11 @@ Condition::Signal ()
return ::pthread_cond_signal (&m_condition);
}
+/* convert struct timeval to ms(milliseconds) */
+static unsigned long int tv2ms(struct timeval a) {
+ return ((a.tv_sec * 1000) + (a.tv_usec / 1000));
+}
+
//----------------------------------------------------------------------
// The Wait() function atomically blocks the current thread
// waiting on the owned condition variable, and unblocks the mutex
@@ -100,7 +98,16 @@ Condition::Wait (Mutex &mutex, const TimeValue *abstime, bool *timed_out)
*timed_out = false;
}
-
return err;
}
+#endif
+
+//----------------------------------------------------------------------
+// Get accessor to the pthread condition object
+//----------------------------------------------------------------------
+lldb::condition_t *
+Condition::GetCondition()
+{
+ return &m_condition;
+}
OpenPOWER on IntegriCloud