14 #ifndef LLVM_SUPPORT_RWMUTEX_H 15 #define LLVM_SUPPORT_RWMUTEX_H 17 #include "llvm/Config/llvm-config.h" 79 #if defined(LLVM_ENABLE_THREADS) && LLVM_ENABLE_THREADS != 0 80 void* data_ =
nullptr;
87 template<
bool mt_only>
114 assert(readers > 0 &&
"Reader lock not acquired before release!");
125 assert(writers == 0 &&
"Writer lock already acquired!");
136 assert(writers == 1 &&
"Writer lock not acquired before release!");
145 template<
bool mt_only>
161 template<
bool mt_only>
179 #endif // LLVM_SUPPORT_RWMUTEX_H SmartRWMutex< mt_only > & mutex
This class represents lattice values for constants.
SmartRWMutex< false > RWMutex
bool reader_release()
Attempts to release the lock in reader mode.
SmartMutex - An R/W mutex with a compile time constant parameter that indicates whether this mutex sh...
ScopedReader - RAII acquisition of a reader lock.
place backedge safepoints impl
ScopedWriter - RAII acquisition of a writer lock.
Platform agnostic RWMutex class.
bool llvm_is_multithreaded()
Returns true if LLVM is compiled with support for multi-threading, and false otherwise.
SmartRWMutex< mt_only > & mutex
bool writer_acquire()
Attempts to unconditionally acquire the lock in reader mode.
SmartScopedReader< false > ScopedReader
SmartScopedReader(SmartRWMutex< mt_only > &m)
SmartScopedWriter< false > ScopedWriter
SmartScopedWriter(SmartRWMutex< mt_only > &m)
bool reader_acquire()
Attempts to unconditionally acquire the lock in reader mode.
RWMutexImpl()
Initializes the lock but doesn't acquire it.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
bool writer_release()
Attempts to release the lock in writer mode.
RWMutexImpl & operator=(const RWMutexImpl &)=delete
~RWMutexImpl()
Releases and removes the lock Destructor.