aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/System/Threading.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/System/Threading.h')
-rw-r--r--include/llvm/System/Threading.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/llvm/System/Threading.h b/include/llvm/System/Threading.h
index 42d2f89..1d0ed1e 100644
--- a/include/llvm/System/Threading.h
+++ b/include/llvm/System/Threading.h
@@ -40,6 +40,20 @@ namespace llvm {
/// release_global_lock - Release the global lock. This is a no-op if called
/// before llvm_start_multithreaded().
void llvm_release_global_lock();
+
+ /// llvm_execute_on_thread - Execute the given \arg UserFn on a separate
+ /// thread, passing it the provided \arg UserData.
+ ///
+ /// This function does not guarantee that the code will actually be executed
+ /// on a separate thread or honoring the requested stack size, but tries to do
+ /// so where system support is available.
+ ///
+ /// \param UserFn - The callback to execute.
+ /// \param UserData - An argument to pass to the callback function.
+ /// \param RequestedStackSize - If non-zero, a requested size (in bytes) for
+ /// the thread stack.
+ void llvm_execute_on_thread(void (*UserFn)(void*), void *UserData,
+ unsigned RequestedStackSize = 0);
}
#endif