Go to the documentation of this file.
60 virtual const char*
what()
const throw() {
return "Thread::RWLockError";}
104 pthread_rwlock_t pthr_rwlock;
144 int reader_lock() noexcept {
return pthread_rwlock_rdlock(&pthr_rwlock);}
181 int writer_lock() noexcept {
return pthread_rwlock_wrlock(&pthr_rwlock);}
213 int unlock() noexcept {
return pthread_rwlock_unlock(&pthr_rwlock);}
230 ~RWLock() {pthread_rwlock_destroy(&pthr_rwlock);}
445 int lock() noexcept {
int ret = rw_lock.
reader_lock();
if (!owner) owner = !ret;
return ret;}
483 int unlock() noexcept {
int ret = rw_lock.
unlock();
if (owner) owner = ret;
return ret;}
730 int lock() noexcept {
int ret = rw_lock.
writer_lock();
if (!owner) owner = !ret;
return ret;}
762 int unlock() noexcept {
int ret = rw_lock.
unlock();
if (owner) owner = ret;
return ret;}
int lock() noexcept
Definition: rw_lock.h:596
int unlock() noexcept
Definition: rw_lock.h:334
int unlock() noexcept
Definition: rw_lock.h:213
Definition: application.h:44
int reader_trylock() noexcept
Definition: rw_lock.h:163
~ReaderTrackLock()
Definition: rw_lock.h:547
WriterLock(RWLock &rw_lock_, Locked tag) noexcept
Definition: rw_lock.h:654
A scoped locking class for exception safe RWLock write locking which tracks the status of its read-wr...
Definition: rw_lock.h:694
RWLock()
Definition: rw_lock.h:224
WriterTrackLock(RWLock &rw_lock_, DeferLock tag) noexcept
Definition: rw_lock.h:798
int lock() noexcept
Definition: rw_lock.h:445
int trylock() noexcept
Definition: rw_lock.h:465
ReaderTrackLock(RWLock &rw_lock_)
Definition: rw_lock.h:512
int lock() noexcept
Definition: rw_lock.h:730
A scoped locking class for exception safe RWLock read locking which tracks the status of its read-wri...
Definition: rw_lock.h:406
RWLock & operator=(const RWLock &)=delete
int writer_trylock() noexcept
Definition: rw_lock.h:192
~WriterLock()
Definition: rw_lock.h:666
bool is_owner() const noexcept
Definition: rw_lock.h:771
ReaderLock(RWLock &rw_lock_)
Definition: rw_lock.h:353
ReaderLock(const RWLock::ReaderLock &)=delete
RWLock::ReaderTrackLock & operator=(const RWLock::ReaderTrackLock &)=delete
WriterLock(const RWLock::WriterLock &)=delete
~RWLock()
Definition: rw_lock.h:230
WriterTrackLock(RWLock &rw_lock_) noexcept
Definition: rw_lock.h:778
WriterTrackLock(RWLock &rw_lock_, Locked tag) noexcept
Definition: rw_lock.h:788
WriterLock(RWLock &rw_lock_) noexcept
Definition: rw_lock.h:644
int writer_lock() noexcept
Definition: rw_lock.h:181
int trylock() noexcept
Definition: rw_lock.h:612
RWLock(const RWLock &)=delete
WriterTrackLock(const RWLock::WriterTrackLock &)=delete
int unlock() noexcept
Definition: rw_lock.h:637
ReaderTrackLock(RWLock &rw_lock_, Locked tag) noexcept
Definition: rw_lock.h:523
DeferLock
Definition: mutex.h:199
virtual const char * what() const
Definition: rw_lock.h:60
int reader_lock() noexcept
Definition: rw_lock.h:144
#define CGU_GLIB_MEMORY_SLICES_FUNCS
Definition: cgu_config.h:84
~ReaderLock()
Definition: rw_lock.h:376
int unlock() noexcept
Definition: rw_lock.h:762
Locked
Definition: mutex.h:196
Provides wrapper classes for pthread mutexes and condition variables, and scoped locking classes for ...
int trylock() noexcept
Definition: rw_lock.h:307
ReaderLock(RWLock &rw_lock_, Locked tag) noexcept
Definition: rw_lock.h:364
A wrapper class for pthread read-write locks.
Definition: rw_lock.h:103
RWLock::ReaderLock & operator=(const RWLock::ReaderLock &)=delete
A scoped locking class for exception safe RWLock read locking.
Definition: rw_lock.h:243
int lock() noexcept
Definition: rw_lock.h:284
int trylock() noexcept
Definition: rw_lock.h:745
A scoped locking class for exception safe RWLock write locking.
Definition: rw_lock.h:560
ReaderTrackLock(const RWLock::ReaderTrackLock &)=delete
RWLock::WriterLock & operator=(const RWLock::WriterLock &)=delete
int unlock() noexcept
Definition: rw_lock.h:483
bool is_owner() const noexcept
Definition: rw_lock.h:493
RWLock::WriterTrackLock & operator=(const RWLock::WriterTrackLock &)=delete
ReaderTrackLock(RWLock &rw_lock_, DeferLock tag) noexcept
Definition: rw_lock.h:533
~WriterTrackLock()
Definition: rw_lock.h:811