LLDB  mainline
HostNativeThreadBase.h
Go to the documentation of this file.
1 //===-- HostNativeThreadBase.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_HostNativeThreadBase_h_
10 #define lldb_Host_HostNativeThreadBase_h_
11 
12 #include "lldb/Utility/Status.h"
13 #include "lldb/lldb-defines.h"
14 #include "lldb/lldb-types.h"
15 
16 namespace lldb_private {
17 
18 #if defined(_WIN32)
19 #define THREAD_ROUTINE __stdcall
20 #else
21 #define THREAD_ROUTINE
22 #endif
23 
25  friend class ThreadLauncher;
26  DISALLOW_COPY_AND_ASSIGN(HostNativeThreadBase);
27 
28 public:
30  explicit HostNativeThreadBase(lldb::thread_t thread);
31  virtual ~HostNativeThreadBase() {}
32 
33  virtual Status Join(lldb::thread_result_t *result) = 0;
34  virtual Status Cancel() = 0;
35  virtual bool IsJoinable() const;
36  virtual void Reset();
37  virtual bool EqualsThread(lldb::thread_t thread) const;
39 
42 
43 protected:
46 
49 };
50 }
51 
52 #endif
void * thread_arg_t
Definition: lldb-types.h:61
Enumerations for broadcasting.
Definition: SBLaunchInfo.h:14
virtual bool EqualsThread(lldb::thread_t thread) const
virtual Status Join(lldb::thread_result_t *result)=0
pthread_t thread_t
Definition: lldb-types.h:58
#define THREAD_ROUTINE
lldb::thread_result_t GetResult() const
static lldb::thread_result_t THREAD_ROUTINE ThreadCreateTrampoline(lldb::thread_arg_t arg)
An error handling class.
Definition: Status.h:44
void * thread_result_t
Definition: lldb-types.h:62