#include <RWLock.h>
Inheritance diagram for RWLock:

Public Methods | |
| RWLock () throw (Synchronization_Exception) | |
| virtual | ~RWLock () throw () |
| Lockable * | getReadLock () |
| Lockable * | getWriteLock () |
Protected Methods | |
| virtual bool | allowReader () |
| virtual bool | allowWriter () |
| virtual void | beforeRead () throw (Synchronization_Exception) |
| virtual void | beforeWrite () throw (Synchronization_Exception) |
| virtual bool | beforeRead (unsigned long) throw (Synchronization_Exception) |
| virtual bool | beforeWrite (unsigned long) throw (Synchronization_Exception) |
| virtual void | postRead () throw (Synchronization_Exception) |
| virtual void | postWrite () throw (Synchronization_Exception) |
Protected Attributes | |
| FastMutex | _mtxLock |
| Serialize access to this object. | |
| Condition | _condRead |
| Notified on read ready. | |
| Condition | _condWrite |
| Notified on write read. | |
| Lockable * | _readLock |
| RLock. | |
| Lockable * | _writeLock |
| WLock. | |
| volatile int | _fairnessCounter |
| track fairness. | |
| volatile int | _activeReaders |
| track the current readers. | |
| volatile int | _activeWriters |
| track the current writers. | |
| volatile int | _waitingReaders |
| track the waiting readers. | |
| volatile int | _waitingWriters |
| track the waiting writers. | |
Friends | |
| class | RLock |
| friend. | |
| class | WLock |
| friend. | |
Because the general case where an RWLock would be used is one where you have more readers than writers, this lock will have a bias toward readers
|
|
Create a new RWLock
|
|
|
Destroy this RWLock |
|
|
Checked before a lock is acquired. Changing this function in a subclass can create RWLocks with different biases.
Reimplemented in BiasedRWLock, and FairRWLock. |
|
|
Checked before a lock is acquired. Changing this function in a subclass can create RWLocks with different biases.
|
|
|
Called just before a read lock tryAcquire()
|
|
|
Called just prior to a read lock acquire() |
|
|
Called just before a write lock tryAcquire()
|
|
|
Called just prior to a write lock acquire() |
|
|
Get a reference to the read lock
|
|
|
Get a reference to the write lock
|
|
|
Called after a read lock is released |
|
|
Called after a write lock is released |
1.2.15