14 #ifndef LLVM_SUPPORT_MUTEX_H
15 #define LLVM_SUPPORT_MUTEX_H
37 explicit MutexImpl(
bool recursive =
true);
88 template<
bool mt_only>
94 MutexImpl(rec), acquired(0), recursive(rec) { }
103 assert((recursive || acquired == 0) &&
"Lock already acquired!!");
116 assert(((recursive && acquired) || (acquired == 1)) &&
117 "Lock not acquired before release!");
137 template<
bool mt_only>
bool acquire()
Unconditionally acquire the lock.
SmartMutex(bool rec=true)
bool release()
Unconditionally release the lock.
SmartMutex< false > Mutex
Mutex - A standard, always enforced mutex.
MutexImpl(bool recursive=true)
Default Constructor.
bool llvm_is_multithreaded()
SmartScopedLock< false > ScopedLock
#define LLVM_DELETED_FUNCTION
Platform agnostic Mutex class.
SmartScopedLock(SmartMutex< mt_only > &m)
bool tryacquire()
Try to acquire the lock.