Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:42:49

0001 //===-- HostThread.h --------------------------------------------*- C++ -*-===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 
0009 #ifndef LLDB_HOST_HOSTTHREAD_H
0010 #define LLDB_HOST_HOSTTHREAD_H
0011 
0012 #include "lldb/Host/HostNativeThreadForward.h"
0013 #include "lldb/Utility/Status.h"
0014 #include "lldb/lldb-types.h"
0015 
0016 #include <memory>
0017 
0018 namespace lldb_private {
0019 
0020 class HostNativeThreadBase;
0021 
0022 /// \class HostInfo HostInfo.h "lldb/Host/HostThread.h"
0023 /// A class that represents a thread running inside of a process on the
0024 ///        local machine.
0025 ///
0026 /// HostThread allows querying and manipulation of threads running on the host
0027 /// machine.
0028 ///
0029 class HostThread {
0030 public:
0031   HostThread();
0032   HostThread(lldb::thread_t thread);
0033 
0034   Status Join(lldb::thread_result_t *result);
0035   Status Cancel();
0036   void Reset();
0037   lldb::thread_t Release();
0038 
0039   bool IsJoinable() const;
0040   HostNativeThread &GetNativeThread();
0041   const HostNativeThread &GetNativeThread() const;
0042   lldb::thread_result_t GetResult() const;
0043 
0044   bool EqualsThread(lldb::thread_t thread) const;
0045 
0046 private:
0047   std::shared_ptr<HostNativeThreadBase> m_native_thread;
0048 };
0049 }
0050 
0051 #endif