#include <cel_rwlock.h>
Public Member Functions | |
ReaderWriterLockLockerTempl () | |
ReaderWriterLockLockerTempl (ReaderWriterLock &rwlock) | |
ReaderWriterLockLockerTempl (ReaderWriterLockLockerTempl &rl) | |
ReaderWriterLockLockerTempl & | operator= (ReaderWriterLockLockerTempl &rl) |
virtual | ~ReaderWriterLockLockerTempl () |
void | lock (ReaderWriterLock &rwlock) |
void | unlock () |
void | swap (ReaderWriterLockLockerTempl &r) |
This template class is to lock ReaderWriterLock instances.
|
inline |
It does not take any parameter.
|
inline |
This constructor creates either of Writer or Reader lock instance and also lock the specified ReaderWriterLock instance.
rwlock | ReaderWriterLock class instance. |
|
inline |
This constructor duplicates the ReaderWriterLockLockerTempl itself. Please note that if the Writer-Lock is duplicated, causes a dead-lock because ReaderWriterLock usually could not accept two Writers.
rl | ReaderWriterLockLockerTempl class instance. |
|
inlinevirtual |
This method also releases the last lock.
|
inline |
This method locks the specified ReaderWriterLock instance.
rwlock | The instance to lock. |
Referenced by Celartem::ReaderWriterLockLockerTempl< isWriter >::operator=(), and Celartem::ReaderWriterLockLockerTempl< isWriter >::ReaderWriterLockLockerTempl().
|
inline |
This constructor duplicates the ReaderWriterLockLockerTempl itself. Please note that if the Writer-Lock is duplicated, causes a dead-lock because ReaderWriterLock usually could not accept two Writers.
rl | ReaderWriterLockLockerTempl class instance. |
|
inline |
This method swaps the locking status each other.
r | A ReaderWriterLockLockerTempl instance with which exchange the locking status. |
|
inline |
This method releases the last lock.
Referenced by Celartem::ReaderWriterLockLockerTempl< isWriter >::lock(), and Celartem::ReaderWriterLockLockerTempl< isWriter >::~ReaderWriterLockLockerTempl().