LLDB mainline
HostThread.cpp
Go to the documentation of this file.
1//===-- HostThread.cpp ----------------------------------------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
11
12using namespace lldb;
13using namespace lldb_private;
14
15HostThread::HostThread() : m_native_thread(new HostNativeThread) {}
16
18 : m_native_thread(new HostNativeThread(thread)) {}
19
21 return m_native_thread->Join(result);
22}
23
25
26void HostThread::Reset() { return m_native_thread->Reset(); }
27
29
30bool HostThread::IsJoinable() const { return m_native_thread->IsJoinable(); }
31
33 return static_cast<HostNativeThread &>(*m_native_thread);
34}
35
37 return static_cast<const HostNativeThread &>(*m_native_thread);
38}
39
41 return m_native_thread->GetResult();
42}
43
45 return m_native_thread->EqualsThread(thread);
46}
Status Join(lldb::thread_result_t *result)
Definition: HostThread.cpp:20
lldb::thread_t Release()
Definition: HostThread.cpp:28
lldb::thread_result_t GetResult() const
Definition: HostThread.cpp:40
std::shared_ptr< HostNativeThreadBase > m_native_thread
Definition: HostThread.h:47
bool EqualsThread(lldb::thread_t thread) const
Definition: HostThread.cpp:44
HostNativeThread & GetNativeThread()
Definition: HostThread.cpp:32
An error handling class.
Definition: Status.h:44
A class that represents a running process on the host machine.
Definition: SBAttachInfo.h:14
Definition: SBAddress.h:15
void * thread_result_t
Definition: lldb-types.h:62
pthread_t thread_t
Definition: lldb-types.h:58