summaryrefslogtreecommitdiffstats
path: root/lldb/source/Host/common/HostNativeThreadBase.cpp
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2014-09-23 18:32:09 +0000
committerZachary Turner <zturner@google.com>2014-09-23 18:32:09 +0000
commitacee96ae5290a965e20f1cb938002d9fd4012075 (patch)
tree090ef226cafe984b57d38731f777c760cacc8fde /lldb/source/Host/common/HostNativeThreadBase.cpp
parent4364fef82f06ebffd6dda0802a0b22126ae52c77 (diff)
downloadbcm5719-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/Host/common/HostNativeThreadBase.cpp')
-rw-r--r--lldb/source/Host/common/HostNativeThreadBase.cpp22
1 files changed, 6 insertions, 16 deletions
diff --git a/lldb/source/Host/common/HostNativeThreadBase.cpp b/lldb/source/Host/common/HostNativeThreadBase.cpp
index 7a2bd6d217f..9fea54d1e3f 100644
--- a/lldb/source/Host/common/HostNativeThreadBase.cpp
+++ b/lldb/source/Host/common/HostNativeThreadBase.cpp
@@ -19,30 +19,16 @@ using namespace lldb_private;
HostNativeThreadBase::HostNativeThreadBase()
: m_thread(LLDB_INVALID_HOST_THREAD)
- , m_state(eThreadStateInvalid)
, m_result(0)
{
}
HostNativeThreadBase::HostNativeThreadBase(thread_t thread)
: m_thread(thread)
- , m_state((thread == LLDB_INVALID_HOST_THREAD) ? eThreadStateInvalid : eThreadStateRunning)
, m_result(0)
{
}
-void
-HostNativeThreadBase::SetState(ThreadState state)
-{
- m_state = state;
-}
-
-ThreadState
-HostNativeThreadBase::GetState() const
-{
- return m_state;
-}
-
lldb::thread_t
HostNativeThreadBase::GetSystemHandle() const
{
@@ -55,11 +41,16 @@ HostNativeThreadBase::GetResult() const
return m_result;
}
+bool
+HostNativeThreadBase::IsJoinable() const
+{
+ return m_thread != LLDB_INVALID_HOST_THREAD;
+}
+
void
HostNativeThreadBase::Reset()
{
m_thread = LLDB_INVALID_HOST_THREAD;
- m_state = eThreadStateInvalid;
m_result = 0;
}
@@ -68,7 +59,6 @@ HostNativeThreadBase::Release()
{
lldb::thread_t result = m_thread;
m_thread = LLDB_INVALID_HOST_THREAD;
- m_state = eThreadStateInvalid;
m_result = 0;
return result;
OpenPOWER on IntegriCloud