LLVM API Documentation
#include <Mutex.h>


Public Member Functions | |
| SmartMutex (bool rec=true) | |
| bool | acquire () |
| Unconditionally acquire the lock. | |
| bool | release () |
| Unconditionally release the lock. | |
| bool | tryacquire () |
| Try to acquire the lock. | |
SmartMutex - A mutex with a compile time constant parameter that indicates whether this mutex should become a no-op when we're not running in multithreaded mode.
| llvm::sys::SmartMutex< mt_only >::SmartMutex | ( | bool | rec = true | ) | [inline, explicit] |
| bool llvm::sys::SmartMutex< mt_only >::acquire | ( | ) | [inline] |
Unconditionally acquire the lock.
Attempts to unconditionally acquire the lock. If the lock is held by another thread, this method will wait until it can acquire the lock.
Reimplemented from llvm::sys::MutexImpl.
Definition at line 96 of file Mutex.h.
Referenced by llvm::sys::SmartMutex< false >::acquire(), llvm::ValueMapCallbackVH< KeyT, ValueT, Config >::allUsesReplacedWith(), llvm::ValueMapCallbackVH< KeyT, ValueT, Config >::deleted(), llvm::llvm_acquire_global_lock(), and llvm::MutexGuard::MutexGuard().
| bool llvm::sys::SmartMutex< mt_only >::release | ( | ) | [inline] |
Unconditionally release the lock.
Attempts to release the lock. If the lock is held by the current thread, the lock is released allowing other threads to acquire the lock.
Reimplemented from llvm::sys::MutexImpl.
Definition at line 109 of file Mutex.h.
Referenced by llvm::ValueMapCallbackVH< KeyT, ValueT, Config >::allUsesReplacedWith(), llvm::ValueMapCallbackVH< KeyT, ValueT, Config >::deleted(), llvm::llvm_release_global_lock(), llvm::sys::SmartMutex< false >::release(), and llvm::MutexGuard::~MutexGuard().
| bool llvm::sys::SmartMutex< mt_only >::tryacquire | ( | ) | [inline] |
Try to acquire the lock.
Attempts to acquire the lock without blocking. If the lock is not available, this function returns false quickly (without blocking). If the lock is available, it is acquired.
Reimplemented from llvm::sys::MutexImpl.
Definition at line 123 of file Mutex.h.
Referenced by llvm::sys::SmartMutex< false >::tryacquire().