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
13#include "lldb/lldb-types.h"
14
15#include "llvm/ADT/StringRef.h"
16#include "llvm/Support/Error.h"
17
18namespace lldb_private {
19
21public:
22 static llvm::Expected<HostThread>
23 LaunchThread(llvm::StringRef name,
24 std::function<lldb::thread_result_t()> thread_function,
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
31 std::string thread_name;
32 std::function<lldb::thread_result_t()> impl;
33
35 std::function<lldb::thread_result_t()> impl)
36 : thread_name(std::move(thread_name)), impl(std::move(impl)) {}
37 };
38};
39}
40
41#endif
static llvm::Expected< HostThread > LaunchThread(llvm::StringRef name, std::function< lldb::thread_result_t()> thread_function, size_t min_stack_byte_size=0)
A class that represents a running process on the host machine.
Definition: SBAttachInfo.h:14
void * thread_result_t
Definition: lldb-types.h:62
std::function< lldb::thread_result_t()> impl
HostThreadCreateInfo(std::string thread_name, std::function< lldb::thread_result_t()> impl)