LLDB  mainline
ThreadLauncher.h
Go to the documentation of this file.
1 //===-- ThreadLauncher.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_THREADLAUNCHER_H
10 #define LLDB_HOST_THREADLAUNCHER_H
11 
12 #include "lldb/Host/HostThread.h"
13 #include "lldb/lldb-types.h"
14 
15 #include "llvm/ADT/StringRef.h"
16 #include "llvm/Support/Error.h"
17 
18 namespace lldb_private {
19 
21 public:
22  static llvm::Expected<HostThread>
23  LaunchThread(llvm::StringRef name, lldb::thread_func_t thread_function,
24  lldb::thread_arg_t thread_arg,
25  size_t min_stack_byte_size = 0); // Minimum stack size in bytes,
26  // set stack size to zero for
27  // default platform thread stack
28  // size
29 
34 
35  HostThreadCreateInfo(const char *name, lldb::thread_func_t fptr,
37  : thread_name(name ? name : ""), thread_fptr(fptr), thread_arg(arg) {}
38  };
39 };
40 }
41 
42 #endif
lldb::thread_func_t
void *(* thread_func_t)(void *)
Definition: lldb-types.h:63
lldb_private::ThreadLauncher
Definition: ThreadLauncher.h:20
lldb_private::ThreadLauncher::HostThreadCreateInfo::thread_fptr
lldb::thread_func_t thread_fptr
Definition: ThreadLauncher.h:32
lldb_private::ThreadLauncher::HostThreadCreateInfo::thread_arg
lldb::thread_arg_t thread_arg
Definition: ThreadLauncher.h:33
HostThread.h
string
string(SUBSTRING ${p} 10 -1 pStripped) if($
Definition: Plugins/CMakeLists.txt:40
lldb::thread_arg_t
void * thread_arg_t
Definition: lldb-types.h:61
lldb-types.h
lldb_private::ThreadLauncher::HostThreadCreateInfo
Definition: ThreadLauncher.h:30
lldb_private::ThreadLauncher::HostThreadCreateInfo::HostThreadCreateInfo
HostThreadCreateInfo(const char *name, lldb::thread_func_t fptr, lldb::thread_arg_t arg)
Definition: ThreadLauncher.h:35
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb_private::ThreadLauncher::LaunchThread
static llvm::Expected< HostThread > LaunchThread(llvm::StringRef name, lldb::thread_func_t thread_function, lldb::thread_arg_t thread_arg, size_t min_stack_byte_size=0)
Definition: ThreadLauncher.cpp:24
lldb_private::ThreadLauncher::HostThreadCreateInfo::thread_name
std::string thread_name
Definition: ThreadLauncher.h:31