diff options
author | emaste <emaste@FreeBSD.org> | 2013-11-12 17:25:33 +0000 |
---|---|---|
committer | emaste <emaste@FreeBSD.org> | 2013-11-12 17:25:33 +0000 |
commit | 9dd6dd992f8bed9a53bf0653fc1eff3fb4ccd46e (patch) | |
tree | b9aa1d1064fb25a0f2313d9a7964c862c0b7b354 /contrib/llvm/tools/lldb/source/Host/common/Condition.cpp | |
parent | 4372cfee12af5dfa890561beb0fecc90957ba058 (diff) | |
parent | c727fe695d28799acb499e9961f11ec07d4f9fe2 (diff) | |
download | FreeBSD-src-9dd6dd992f8bed9a53bf0653fc1eff3fb4ccd46e.zip FreeBSD-src-9dd6dd992f8bed9a53bf0653fc1eff3fb4ccd46e.tar.gz |
Update LLDB to upstream r194122 snapshot
ludes minor changes relative to upstream, for compatibility with
FreeBSD's in-tree LLVM 3.3:
- Reverted LLDB r191806, restoring use of previous API.
- Reverted part of LLDB r189317, restoring previous enum names.
- Work around missing LLVM r192504, using previous registerEHFrames API
(limited functionality).
- Removed PlatformWindows header include and init/terminate calls.
Sponsored by: DARPA, AFRL
Diffstat (limited to 'contrib/llvm/tools/lldb/source/Host/common/Condition.cpp')
-rw-r--r-- | contrib/llvm/tools/lldb/source/Host/common/Condition.cpp | 27 |
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; +} |