1 //===-- ThreadLauncher.h -----------------------------------------*- C++
4 // The LLVM Compiler Infrastructure
6 // This file is distributed under the University of Illinois Open Source
7 // License. See LICENSE.TXT for details.
9 //===----------------------------------------------------------------------===//
11 #ifndef lldb_Host_ThreadLauncher_h_
12 #define lldb_Host_ThreadLauncher_h_
14 #include "lldb/Host/HostThread.h"
15 #include "lldb/Utility/Status.h"
16 #include "lldb/lldb-types.h"
18 #include "llvm/ADT/StringRef.h"
20 namespace lldb_private {
22 class ThreadLauncher {
25 LaunchThread(llvm::StringRef name, lldb::thread_func_t thread_function,
26 lldb::thread_arg_t thread_arg, Status *error_ptr,
27 size_t min_stack_byte_size = 0); // Minimum stack size in bytes,
28 // set stack size to zero for
29 // default platform thread stack
32 struct HostThreadCreateInfo {
33 std::string thread_name;
34 lldb::thread_func_t thread_fptr;
35 lldb::thread_arg_t thread_arg;
37 HostThreadCreateInfo(const char *name, lldb::thread_func_t fptr,
38 lldb::thread_arg_t arg)
39 : thread_name(name ? name : ""), thread_fptr(fptr), thread_arg(arg) {}