39#ifndef BLOCXX_RWLOCKER_HPP_INCLUDE_GUARD_
40#define BLOCXX_RWLOCKER_HPP_INCLUDE_GUARD_
41#include "blocxx/BLOCXX_config.h"
59 void getReadLock(
const Timeout& timeout);
60 void getReadLock(UInt32 sTimeout, UInt32 usTimeout=0) BLOCXX_DEPRECATED;
68 void getWriteLock(
const Timeout& timeout);
69 void getWriteLock(UInt32 sTimeout, UInt32 usTimeout=0) BLOCXX_DEPRECATED;
74 void releaseReadLock();
79 void releaseWriteLock();
87 bool operator()(Thread_t x, Thread_t y)
const;
104 m_locker->getReadLock(timeout);
106 ReadLock(
RWLocker& locker, UInt32 sTimeout, UInt32 usTimeout=0) BLOCXX_DEPRECATED;
115 m_locker->getReadLock(timeout);
119 BLOCXX_DEPRECATED
void lock(UInt32 sTimeout, UInt32 usTimeout=0)
123 m_locker->getReadLock(Timeout::relative(sTimeout +
static_cast<float>(usTimeout) * 1000000.0));
131 m_locker->releaseReadLock();
158 m_locker->getWriteLock(timeout);
160 WriteLock(
RWLocker& locker, UInt32 sTimeout, UInt32 usTimeout=0) BLOCXX_DEPRECATED;
169 m_locker->getWriteLock(timeout);
173 BLOCXX_DEPRECATED
void lock(UInt32 sTimeout, UInt32 usTimeout=0)
177 m_locker->getWriteLock(Timeout::relative(sTimeout +
static_cast<float>(usTimeout) * 1000000.0));
185 m_locker->releaseWriteLock();
#define BLOCXX_DECLARE_APIEXCEPTION(NAME, LINKAGE_SPEC)
Declare a new exception class named <NAME>Exception that derives from Exception This macro is typical...
This class is the implementation of the read/write lock.
void getWriteLock(const Timeout &timeout)
GenericRWLockImpl< Thread_t, ThreadComparer > m_impl
void getReadLock(const Timeout &timeout)
RWLocker(const RWLocker &)
RWLocker & operator=(const RWLocker &)
BLOCXX_DEPRECATED void lock(UInt32 sTimeout, UInt32 usTimeout=0)
ReadLock & operator=(const ReadLock &)
void lock(const Timeout &timeout)
ReadLock(RWLocker &locker, const Timeout &timeout)
ReadLock(const ReadLock &)
A timeout can be absolute, which means that it will happen at the specified DateTime.
static Timeout relative(float seconds)
WriteLock(RWLocker &locker, const Timeout &timeout)
WriteLock(const WriteLock &)
BLOCXX_DEPRECATED void lock(UInt32 sTimeout, UInt32 usTimeout=0)
void lock(const Timeout &timeout)
WriteLock & operator=(const WriteLock &)