aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/lldb/include/lldb/Host/ThreadLauncher.h
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm-project/lldb/include/lldb/Host/ThreadLauncher.h')
-rw-r--r--contrib/llvm-project/lldb/include/lldb/Host/ThreadLauncher.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/contrib/llvm-project/lldb/include/lldb/Host/ThreadLauncher.h b/contrib/llvm-project/lldb/include/lldb/Host/ThreadLauncher.h
index 00b42fa6a11d..8bb6c79466a7 100644
--- a/contrib/llvm-project/lldb/include/lldb/Host/ThreadLauncher.h
+++ b/contrib/llvm-project/lldb/include/lldb/Host/ThreadLauncher.h
@@ -20,8 +20,8 @@ namespace lldb_private {
class ThreadLauncher {
public:
static llvm::Expected<HostThread>
- LaunchThread(llvm::StringRef name, lldb::thread_func_t thread_function,
- lldb::thread_arg_t thread_arg,
+ LaunchThread(llvm::StringRef name,
+ std::function<lldb::thread_result_t()> thread_function,
size_t min_stack_byte_size = 0); // Minimum stack size in bytes,
// set stack size to zero for
// default platform thread stack
@@ -29,12 +29,11 @@ public:
struct HostThreadCreateInfo {
std::string thread_name;
- lldb::thread_func_t thread_fptr;
- lldb::thread_arg_t thread_arg;
+ std::function<lldb::thread_result_t()> impl;
- HostThreadCreateInfo(const char *name, lldb::thread_func_t fptr,
- lldb::thread_arg_t arg)
- : thread_name(name ? name : ""), thread_fptr(fptr), thread_arg(arg) {}
+ HostThreadCreateInfo(std::string thread_name,
+ std::function<lldb::thread_result_t()> impl)
+ : thread_name(std::move(thread_name)), impl(std::move(impl)) {}
};
};
}