aboutsummaryrefslogtreecommitdiff
path: root/include/llvm-c
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2013-02-17 16:35:51 +0000
committerDuncan Sands <baldrick@free.fr>2013-02-17 16:35:51 +0000
commit906727dcfeb359acec4caca3ba8c756c4308ff6b (patch)
treed12c1a86c8f200929c62f116ff1c10accea1a56f /include/llvm-c
parentf79f136cc64b0625b77c7b9008ed8c5b848b6b17 (diff)
Add multithreading functions and shutdown to the C API. Patch by Moritz
Maxeiner. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175398 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm-c')
-rw-r--r--include/llvm-c/Core.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/include/llvm-c/Core.h b/include/llvm-c/Core.h
index c2445cd070..e85fb97505 100644
--- a/include/llvm-c/Core.h
+++ b/include/llvm-c/Core.h
@@ -358,6 +358,11 @@ typedef enum {
void LLVMInitializeCore(LLVMPassRegistryRef R);
+/** Deallocate and destroy all ManagedStatic variables.
+ @see llvm::llvm_shutdown
+ @see ManagedStatic */
+void LLVMShutdown();
+
/*===-- Error handling ----------------------------------------------------===*/
@@ -2627,6 +2632,34 @@ void LLVMDisposePassManager(LLVMPassManagerRef PM);
*/
/**
+ * @defgroup LLVMCCoreThreading Threading
+ *
+ * Handle the structures needed to make LLVM safe for multithreading.
+ *
+ * @{
+ */
+
+/** Allocate and initialize structures needed to make LLVM safe for
+ multithreading. The return value indicates whether multithreaded
+ initialization succeeded. Must be executed in isolation from all
+ other LLVM api calls.
+ @see llvm::llvm_start_multithreaded */
+LLVMBool LLVMStartMultithreaded();
+
+/** Deallocate structures necessary to make LLVM safe for multithreading.
+ Must be executed in isolation from all other LLVM api calls.
+ @see llvm::llvm_stop_multithreaded */
+void LLVMStopMultithreaded();
+
+/** Check whether LLVM is executing in thread-safe mode or not.
+ @see llvm::llvm_is_multithreaded */
+LLVMBool LLVMIsMultithreaded();
+
+/**
+ * @}
+ */
+
+/**
* @}
*/