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
16
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}
47
49 if (!m_native_thread)
50 return false;
51 return m_native_thread->GetSystemHandle() != LLDB_INVALID_HOST_THREAD;
52}
Status Join(lldb::thread_result_t *result)
lldb::thread_t Release()
lldb::thread_result_t GetResult() const
std::shared_ptr< HostNativeThreadBase > m_native_thread
Definition HostThread.h:49
bool EqualsThread(lldb::thread_t thread) const
HostNativeThread & GetNativeThread()
An error handling class.
Definition Status.h:118
#define LLDB_INVALID_HOST_THREAD
Definition lldb-types.h:69
A class that represents a running process on the host machine.
HostThreadPosix HostNativeThread
void * thread_result_t
Definition lldb-types.h:62
pthread_t thread_t
Definition lldb-types.h:58