14 #ifndef LLVM_SUPPORT_MUTEX_H 15 #define LLVM_SUPPORT_MUTEX_H 17 #include "llvm/Config/llvm-config.h" 38 explicit MutexImpl(
bool recursive =
true);
74 #if defined(LLVM_ENABLE_THREADS) && LLVM_ENABLE_THREADS != 0 83 void operator=(
const MutexImpl &) =
delete;
91 template<
bool mt_only>
98 impl(rec), acquired(0), recursive(rec) { }
107 assert((recursive || acquired == 0) &&
"Lock already acquired!!");
120 assert(((recursive && acquired) || (acquired == 1)) &&
121 "Lock not acquired before release!");
141 template<
bool mt_only>
bool acquire()
Attempts to unconditionally acquire the lock.
This class represents lattice values for constants.
SmartMutex - A mutex with a compile time constant parameter that indicates whether this mutex should ...
SmartMutex(bool rec=true)
bool release()
Attempts to release the lock.
SmartMutex< false > Mutex
Mutex - A standard, always enforced mutex.
MutexImpl(bool recursive=true)
Initializes the lock but doesn't acquire it.
place backedge safepoints impl
bool llvm_is_multithreaded()
Returns true if LLVM is compiled with support for multi-threading, and false otherwise.
SmartScopedLock< false > ScopedLock
Platform agnostic Mutex class.
SmartScopedLock(SmartMutex< mt_only > &m)
~MutexImpl()
Releases and removes the lock Destructor.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
bool tryacquire()
Attempts to acquire the lock without blocking.