1 //===-- ThreadLauncher.h -----------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef lldb_Host_ThreadLauncher_h_
11 #define lldb_Host_ThreadLauncher_h_
13 #include "lldb/Core/Error.h"
14 #include "lldb/Host/HostThread.h"
15 #include "lldb/lldb-types.h"
17 #include "llvm/ADT/StringRef.h"
19 namespace lldb_private
25 static HostThread LaunchThread(llvm::StringRef name,
26 lldb::thread_func_t thread_function,
27 lldb::thread_arg_t thread_arg,
29 size_t min_stack_byte_size = 0); // Minimum stack size in bytes, set stack size to zero for default platform thread stack size
31 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, lldb::thread_arg_t arg)
38 : thread_name(name ? name : "")