File indexing completed on 2026-05-10 08:42:49
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef LLDB_HOST_THREADLAUNCHER_H
0010 #define LLDB_HOST_THREADLAUNCHER_H
0011
0012 #include "lldb/Host/HostThread.h"
0013 #include "lldb/lldb-types.h"
0014
0015 #include "llvm/ADT/StringRef.h"
0016 #include "llvm/Support/Error.h"
0017
0018 namespace lldb_private {
0019
0020 class ThreadLauncher {
0021 public:
0022 static llvm::Expected<HostThread>
0023 LaunchThread(llvm::StringRef name,
0024 std::function<lldb::thread_result_t()> thread_function,
0025 size_t min_stack_byte_size = 0);
0026
0027
0028
0029
0030 struct HostThreadCreateInfo {
0031 std::string thread_name;
0032 std::function<lldb::thread_result_t()> impl;
0033
0034 HostThreadCreateInfo(std::string thread_name,
0035 std::function<lldb::thread_result_t()> impl)
0036 : thread_name(std::move(thread_name)), impl(std::move(impl)) {}
0037 };
0038 };
0039 }
0040
0041 #endif