diff options
author | Zachary Turner <zturner@google.com> | 2014-09-23 18:32:09 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2014-09-23 18:32:09 +0000 |
commit | acee96ae5290a965e20f1cb938002d9fd4012075 (patch) | |
tree | 090ef226cafe984b57d38731f777c760cacc8fde /lldb/source/Plugins/Process/MacOSX-Kernel | |
parent | 4364fef82f06ebffd6dda0802a0b22126ae52c77 (diff) | |
download | bcm5719-llvm-acee96ae5290a965e20f1cb938002d9fd4012075.tar.gz bcm5719-llvm-acee96ae5290a965e20f1cb938002d9fd4012075.zip |
Fix up the HostThread interface, making the interface simpler.
Reviewed by: Greg Clayton
Differential Revision: http://reviews.llvm.org/D5417
llvm-svn: 218325
Diffstat (limited to 'lldb/source/Plugins/Process/MacOSX-Kernel')
-rw-r--r-- | lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp b/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp index 9ea65adf5c6..668d1b25569 100644 --- a/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp +++ b/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp @@ -469,7 +469,7 @@ ProcessKDP::DoResume () Error error; Log *log (ProcessKDPLog::GetLogIfAllCategoriesSet (KDP_LOG_PROCESS)); // Only start the async thread if we try to do any process control - if (m_async_thread.GetState() != eThreadStateRunning) + if (!m_async_thread.IsJoinable()) StartAsyncThread(); bool resume = false; @@ -870,11 +870,11 @@ ProcessKDP::StartAsyncThread () if (log) log->Printf ("ProcessKDP::StartAsyncThread ()"); - if (m_async_thread.GetState() == eThreadStateRunning) + if (m_async_thread.IsJoinable()) return true; m_async_thread = ThreadLauncher::LaunchThread("<lldb.process.kdp-remote.async>", ProcessKDP::AsyncThread, this, NULL); - return m_async_thread.GetState() == eThreadStateRunning; + return m_async_thread.IsJoinable(); } void @@ -888,11 +888,8 @@ ProcessKDP::StopAsyncThread () m_async_broadcaster.BroadcastEvent (eBroadcastBitAsyncThreadShouldExit); // Stop the stdio thread - if (m_async_thread.GetState() == eThreadStateRunning) - { + if (m_async_thread.IsJoinable()) m_async_thread.Join(nullptr); - m_async_thread.Reset(); - } } |