LLVM
8.0.1
|
Platform agnostic RWMutex class. More...
#include "llvm/Support/RWMutex.h"
Public Member Functions | |
~RWMutexImpl () | |
Releases and removes the lock Destructor. More... | |
Constructors | |
RWMutexImpl () | |
Initializes the lock but doesn't acquire it. More... | |
Do Not Implement | |
RWMutexImpl (const RWMutexImpl &original)=delete | |
RWMutexImpl & | operator= (const RWMutexImpl &)=delete |
Methods | |
bool | reader_acquire () |
Attempts to unconditionally acquire the lock in reader mode. More... | |
bool | reader_release () |
Attempts to release the lock in reader mode. More... | |
bool | writer_acquire () |
Attempts to unconditionally acquire the lock in reader mode. More... | |
bool | writer_release () |
Attempts to release the lock in writer mode. More... | |
|
explicit |
Initializes the lock but doesn't acquire it.
Default Constructor.
Definition at line 49 of file RWMutex.cpp.
References assert(), and llvm::safe_malloc().
|
delete |
RWMutexImpl::~RWMutexImpl | ( | ) |
Releases and removes the lock Destructor.
Definition at line 70 of file RWMutex.cpp.
References assert().
|
delete |
bool RWMutexImpl::reader_acquire | ( | ) |
Attempts to unconditionally acquire the lock in reader mode.
If the lock is held by a writer, this method will wait until it can acquire the lock.
Definition at line 79 of file RWMutex.cpp.
References assert().
Referenced by llvm::sys::SmartRWMutex< true >::lock_shared().
bool RWMutexImpl::reader_release | ( | ) |
Attempts to release the lock in reader mode.
Definition at line 89 of file RWMutex.cpp.
References assert().
Referenced by llvm::sys::SmartRWMutex< true >::unlock_shared().
bool RWMutexImpl::writer_acquire | ( | ) |
Attempts to unconditionally acquire the lock in reader mode.
If the lock is held by any readers, this method will wait until it can acquire the lock.
Definition at line 99 of file RWMutex.cpp.
References assert().
Referenced by llvm::sys::SmartRWMutex< true >::lock().
bool RWMutexImpl::writer_release | ( | ) |
Attempts to release the lock in writer mode.
Definition at line 109 of file RWMutex.cpp.
References assert().
Referenced by llvm::sys::SmartRWMutex< true >::unlock().