#include <RWLock.h>
Public Member Functions | |
bool | readLock () |
bool | readLock (const ::icl_core::TimeStamp &timeout) |
bool | readLock (const ::icl_core::TimeSpan &timeout) |
RWLock () | |
bool | tryReadLock () |
bool | tryWriteLock () |
void | unlock () |
bool | writeLock () |
bool | writeLock (const ::icl_core::TimeStamp &timeout) |
bool | writeLock (const ::icl_core::TimeSpan &timeout) |
virtual | ~RWLock () |
Private Attributes | |
RWLockImpl * | m_impl |
Creates a read/write lock.
Definition at line 33 of file RWLock.cpp.
icl_core::thread::RWLock::~RWLock | ( | ) | [virtual] |
Destroys a read/write lock.
Definition at line 65 of file RWLock.cpp.
bool icl_core::thread::RWLock::readLock | ( | ) |
Tries to get a shared read lock on the RWLock.
true
if locking succeeds, or false
on a timeout or every other failure. Definition at line 72 of file RWLock.cpp.
bool icl_core::thread::RWLock::readLock | ( | const ::icl_core::TimeStamp & | timeout | ) |
Tries to get a shared read lock on the RWLock with an absolute timeout. The function may then return with false
if the absolute time passes without being able to lock the RWLock.
Definition at line 81 of file RWLock.cpp.
bool icl_core::thread::RWLock::readLock | ( | const ::icl_core::TimeSpan & | timeout | ) |
Tries to get a shared read lock on the RWLock with a relative timeout. The function may then return with false
if the relative time passes without being able to lock the RWLock.
Definition at line 91 of file RWLock.cpp.
Tries to get a shared read lock on the RWLock without blocking. The mutex is locked if it is available.
true
if the RWLock has been locked, false
otherwise. Definition at line 101 of file RWLock.cpp.
Tries to get a shared write lock on the RWLock without blocking. The RWLock is locked if it is available.
true
if the RWLock has been locked, false
otherwise. Definition at line 139 of file RWLock.cpp.
void icl_core::thread::RWLock::unlock | ( | ) |
Releases a shared read or write lock on the RWLock.
Definition at line 148 of file RWLock.cpp.
bool icl_core::thread::RWLock::writeLock | ( | ) |
Tries to get a shared write lock on the RWLock.
true
if locking succeeds, or false
on a timeout or every other failure. Definition at line 110 of file RWLock.cpp.
bool icl_core::thread::RWLock::writeLock | ( | const ::icl_core::TimeStamp & | timeout | ) |
Tries to get a shared write lock on the RWLock with an absolute timeout. The function may then return with false
if the absolute time passes without being able to lock the RWLock.
Definition at line 119 of file RWLock.cpp.
bool icl_core::thread::RWLock::writeLock | ( | const ::icl_core::TimeSpan & | timeout | ) |
Tries to get a shared write lock on the RWLock with a relative timeout. The function may then return with false
if the relative time passes without being able to lock the RWLock.
Definition at line 129 of file RWLock.cpp.
RWLockImpl* icl_core::thread::RWLock::m_impl [private] |