LLDB  mainline
HostThread.h
Go to the documentation of this file.
1 //===-- HostThread.h --------------------------------------------*- 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 #ifndef LLDB_HOST_HOSTTHREAD_H
10 #define LLDB_HOST_HOSTTHREAD_H
11 
13 #include "lldb/Utility/Status.h"
14 #include "lldb/lldb-types.h"
15 
16 #include <memory>
17 
18 namespace lldb_private {
19 
20 class HostNativeThreadBase;
21 
22 /// \class HostInfo HostInfo.h "lldb/Host/HostThread.h"
23 /// A class that represents a thread running inside of a process on the
24 /// local machine.
25 ///
26 /// HostThread allows querying and manipulation of threads running on the host
27 /// machine.
28 ///
29 class HostThread {
30 public:
31  HostThread();
32  HostThread(lldb::thread_t thread);
33 
35  Status Cancel();
36  void Reset();
38 
39  bool IsJoinable() const;
41  const HostNativeThread &GetNativeThread() const;
43 
44  bool EqualsThread(lldb::thread_t thread) const;
45 
46 private:
47  std::shared_ptr<HostNativeThreadBase> m_native_thread;
48 };
49 }
50 
51 #endif
lldb_private::HostThread::GetResult
lldb::thread_result_t GetResult() const
Definition: HostThread.cpp:40
lldb_private::HostThread::GetNativeThread
HostNativeThread & GetNativeThread()
Definition: HostThread.cpp:32
lldb_private::HostThread
Definition: HostThread.h:29
lldb_private::HostThreadPosix
Definition: HostThreadPosix.h:16
lldb_private::HostThread::m_native_thread
std::shared_ptr< HostNativeThreadBase > m_native_thread
Definition: HostThread.h:47
lldb_private::HostThread::Release
lldb::thread_t Release()
Definition: HostThread.cpp:28
lldb::thread_t
pthread_t thread_t
Definition: lldb-types.h:58
lldb_private::HostThread::EqualsThread
bool EqualsThread(lldb::thread_t thread) const
Definition: HostThread.cpp:44
lldb_private::HostThread::Cancel
Status Cancel()
Definition: HostThread.cpp:24
lldb_private::HostThread::Reset
void Reset()
Definition: HostThread.cpp:26
lldb_private::HostThread::HostThread
HostThread()
Definition: HostThread.cpp:15
lldb-types.h
HostNativeThreadForward.h
lldb_private::HostThread::Join
Status Join(lldb::thread_result_t *result)
Definition: HostThread.cpp:20
lldb_private::Status
Definition: Status.h:44
lldb::thread_result_t
void * thread_result_t
Definition: lldb-types.h:62
Status.h
lldb_private::HostThread::IsJoinable
bool IsJoinable() const
Definition: HostThread.cpp:30
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16