diff options
author | Duncan Sands <baldrick@free.fr> | 2013-02-17 16:35:51 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2013-02-17 16:35:51 +0000 |
commit | 1cba0a8e0aea9758a066bb8802020ee8f6502b06 (patch) | |
tree | a908b89c3e7df0dd70db09a371074008818ac4d0 /llvm/include/llvm-c/Core.h | |
parent | 76e65e45425a63f8915a389a7a385cac3aae52bf (diff) | |
download | bcm5719-llvm-1cba0a8e0aea9758a066bb8802020ee8f6502b06.tar.gz bcm5719-llvm-1cba0a8e0aea9758a066bb8802020ee8f6502b06.zip |
Add multithreading functions and shutdown to the C API. Patch by Moritz
Maxeiner.
llvm-svn: 175398
Diffstat (limited to 'llvm/include/llvm-c/Core.h')
-rw-r--r-- | llvm/include/llvm-c/Core.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/llvm/include/llvm-c/Core.h b/llvm/include/llvm-c/Core.h index c2445cd0704..e85fb975050 100644 --- a/llvm/include/llvm-c/Core.h +++ b/llvm/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(); + +/** + * @} + */ + +/** * @} */ |