/Users/buildslave/jenkins/workspace/coverage/llvm-project/lldb/source/Host/common/HostThread.cpp
Line | Count | Source (jump to first uncovered line) |
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 | | |
9 | | #include "lldb/Host/HostThread.h" |
10 | | #include "lldb/Host/HostNativeThread.h" |
11 | | |
12 | | using namespace lldb; |
13 | | using namespace lldb_private; |
14 | | |
15 | 38.0k | HostThread::HostThread() : m_native_thread(new HostNativeThread) {} |
16 | | |
17 | | HostThread::HostThread(lldb::thread_t thread) |
18 | 7.95k | : m_native_thread(new HostNativeThread(thread)) {} |
19 | | |
20 | 7.41k | Status HostThread::Join(lldb::thread_result_t *result) { |
21 | 7.41k | return m_native_thread->Join(result); |
22 | 7.41k | } |
23 | | |
24 | 0 | Status HostThread::Cancel() { return m_native_thread->Cancel(); } |
25 | | |
26 | 4.68k | void HostThread::Reset() { return m_native_thread->Reset(); } |
27 | | |
28 | 0 | lldb::thread_t HostThread::Release() { return m_native_thread->Release(); } |
29 | | |
30 | 1.57M | bool HostThread::IsJoinable() const { return m_native_thread->IsJoinable(); } |
31 | | |
32 | 0 | HostNativeThread &HostThread::GetNativeThread() { |
33 | 0 | return static_cast<HostNativeThread &>(*m_native_thread); |
34 | 0 | } |
35 | | |
36 | 0 | const HostNativeThread &HostThread::GetNativeThread() const { |
37 | 0 | return static_cast<const HostNativeThread &>(*m_native_thread); |
38 | 0 | } |
39 | | |
40 | 0 | lldb::thread_result_t HostThread::GetResult() const { |
41 | 0 | return m_native_thread->GetResult(); |
42 | 0 | } |
43 | | |
44 | 1.53M | bool HostThread::EqualsThread(lldb::thread_t thread) const { |
45 | 1.53M | return m_native_thread->EqualsThread(thread); |
46 | 1.53M | } |