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. | |
Definition at line 88 of file Mutex.h.
| 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 95 of file Mutex.h.
Referenced by llvm::Type::addAbstractTypeUser(), llvm::llvm_acquire_global_lock(), llvm::MutexGuard::MutexGuard(), llvm::DerivedType::notifyUsesThatTypeBecameConcrete(), llvm::Timer::operator=(), llvm::Timer::print(), llvm::Type::removeAbstractTypeUser(), and llvm::DerivedType::unlockedRefineAbstractTypeTo().
| 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 106 of file Mutex.h.
Referenced by llvm::Type::addAbstractTypeUser(), llvm::llvm_release_global_lock(), llvm::Timer::operator=(), llvm::Timer::print(), llvm::Type::removeAbstractTypeUser(), llvm::DerivedType::unlockedRefineAbstractTypeTo(), 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.