LLDB  mainline
HostThread.cpp
Go to the documentation of this file.
1 //===-- HostThread.cpp ------------------------------------------*- C++ -*-===//
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 
9 #include "lldb/Host/HostThread.h"
11 
12 using namespace lldb;
13 using namespace lldb_private;
14 
15 HostThread::HostThread() : m_native_thread(new HostNativeThread) {}
16 
18  : m_native_thread(new HostNativeThread(thread)) {}
19 
21  return m_native_thread->Join(result);
22 }
23 
24 Status HostThread::Cancel() { return m_native_thread->Cancel(); }
25 
26 void HostThread::Reset() { return m_native_thread->Reset(); }
27 
28 lldb::thread_t HostThread::Release() { return m_native_thread->Release(); }
29 
30 bool 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 }
bool EqualsThread(lldb::thread_t thread) const
Definition: HostThread.cpp:44
Enumerations for broadcasting.
Definition: SBLaunchInfo.h:14
HostNativeThread & GetNativeThread()
Definition: HostThread.cpp:32
Status Join(lldb::thread_result_t *result)
Definition: HostThread.cpp:20
lldb::thread_t Release()
Definition: HostThread.cpp:28
pthread_t thread_t
Definition: lldb-types.h:58
Definition: SBAddress.h:15
lldb::thread_result_t GetResult() const
Definition: HostThread.cpp:40
An error handling class.
Definition: Status.h:44
void * thread_result_t
Definition: lldb-types.h:62