#include <cel_rwlock.h>
This class is to lock ReaderWriterLock instances.
- See Also
- ReaderLock, WriterLock, ReaderWriterLock
Celartem::RWLock::RWLock |
( |
| ) |
|
|
inline |
It does not take any parameter.
This constructor creates either of Writer or Reader lock instance and also lock the specified ReaderWriterLock instance.
- Parameters
-
rwlock | ReaderWriterLock class instance. |
writeLock | true to do writer lock, otherwise do reader lock. |
Celartem::RWLock::RWLock |
( |
RWLock & |
rl | ) |
|
|
inline |
This constructor duplicates the RWLock itself. Please note that if the Writer-Lock is duplicated, causes a dead-lock because ReaderWriterLock usually could not accept two Writers.
- Parameters
-
virtual Celartem::RWLock::~RWLock |
( |
| ) |
|
|
inlinevirtual |
This method also releases the last lock.
void Celartem::RWLock::lock |
( |
ReaderWriterLock & |
rwlock, |
|
|
bool |
writeLock = false |
|
) |
| |
|
inline |
This method locks the specified ReaderWriterLock instance.
- Parameters
-
rwlock | The instance to lock. |
writeLock | true to do writer lock, otherwise do reader lock. |
Referenced by operator=(), and RWLock().
This constructor duplicates the RWLock itself. Please note that if the Writer-Lock is duplicated, causes a dead-lock because ReaderWriterLock usually could not accept two Writers.
- Parameters
-
void Celartem::RWLock::swap |
( |
RWLock & |
r | ) |
|
|
inline |
This method swaps the locking status each other.
- Parameters
-
r | A RWLock instance with which exchange the locking status. |
void Celartem::RWLock::unlock |
( |
| ) |
|
|
inline |
The documentation for this class was generated from the following file: