|
ldas-tools-al 2.6.7
|
Implements read/write lock symantics. More...
#include <ReadWriteLock.hh>

Classes | |
| class | BusyError |
| Busy lock error. More... | |
| class | DeadLockError |
| Deadlock error. More... | |
| class | TimedoutError |
| Time out error. More... | |
| class | baton_type |
| Manager of the read/write lock resource. More... | |
Public Types | |
| enum | lock_mode { NONE = 0x0000 , READ = 0x0001 , WRITE = 0x0002 , NONE = 0x0000 , READ = 0x0001 , WRITE = 0x0002 } |
| Lock mode. More... | |
| enum | lock_mode { NONE = 0x0000 , READ = 0x0001 , WRITE = 0x0002 , NONE = 0x0000 , READ = 0x0001 , WRITE = 0x0002 } |
| Lock mode. More... | |
| enum | lock_state { STATE_NONE = 0x0000 , PENDING = 0x0001 , ACTIVE = 0x0002 , STATE_NONE = 0x0000 , PENDING = 0x0001 , ACTIVE = 0x0002 } |
| Lock state. More... | |
| enum | lock_state { STATE_NONE = 0x0000 , PENDING = 0x0001 , ACTIVE = 0x0002 , STATE_NONE = 0x0000 , PENDING = 0x0001 , ACTIVE = 0x0002 } |
| Lock state. More... | |
| typedef enum LDASTools::AL::ReadWriteLock::lock_mode | mode_type |
| Lock mode. | |
| typedef enum LDASTools::AL::ReadWriteLock::lock_mode | mode_type |
| Lock mode. | |
Public Member Functions | |
| ReadWriteLock (baton_type Lock, mode_type Mode, const char *Filename, int Linenum) | |
| Constructor. | |
| ReadWriteLock (baton_type Lock, mode_type Mode, bool TryLock, const char *Filename, int Linenum) | |
| Constructor. | |
| ReadWriteLock (baton_type Lock, mode_type Mode, int Timeout, const char *Filename, int Linenum) | |
| Constructor. | |
| ReadWriteLock (baton_type Lock, mode_type Mode, const char *Filename, int Linenum) | |
| Constructor. | |
| ReadWriteLock (baton_type Lock, mode_type Mode, bool TryLock, const char *Filename, int Linenum) | |
| Constructor. | |
| ReadWriteLock (baton_type Lock, mode_type Mode, int Timeout, const char *Filename, int Linenum) | |
| Constructor. | |
| virtual | ~ReadWriteLock () |
| Destructor. | |
| virtual | ~ReadWriteLock () |
| Destructor. | |
| void | Modify (mode_type Mode, const char *Filename, int Linenum) |
| Modify the mode of lock being held on the resource. | |
| void | Modify (mode_type Mode, const char *Filename, int Linenum) |
| Modify the mode of lock being held on the resource. | |
| void | Release (const char *Filename, int Linenum) |
| Release the lock. | |
| void | Release (const char *Filename, int Linenum) |
| Release the lock. | |
Static Public Member Functions | |
| static baton_type | Baton () |
| Create a baton that is appropriate for use with this class. | |
| static baton_type | Baton () |
| Create a baton that is appropriate for use with this class. | |
| static int | Interval (int Value) |
| static int | Interval (int Value) |
| static int | Timeout (int Value) |
| static int | Timeout (int Value) |
| static void | ThreadCancel (void *VLock) |
| Handler for thead cancelation. | |
| static void | ThreadCancel (void *VLock) |
| Handler for thead cancelation. | |
Private Attributes | |
| baton_type | sync_baton |
Implements read/write lock symantics.
This class provides proper garbage collection of system resource used to implement thread safe read/write locks.
Lock mode.
Lock mode.
| LDASTools::AL::ReadWriteLock::ReadWriteLock | ( | baton_type | Lock, |
| mode_type | Mode, | ||
| const char * | Filename, | ||
| int | Linenum ) |
Constructor.
| [in] | Lock | Baton controlling access to the resource. |
| [in] | Mode | Any of the lock_modes. |
| [in] | File | The filename from where the call was made. |
| [in] | Line | The line number from where the call was made. |
| LDASTools::AL::ReadWriteLock::ReadWriteLock | ( | baton_type | Lock, |
| mode_type | Mode, | ||
| bool | TryLock, | ||
| const char * | Filename, | ||
| int | Linenum ) |
Constructor.
| [in] | Lock | Baton controlling access to the resource. |
| [in] | Mode | Any of the lock_modes. |
| [in] | TryLock | If true, then return immediately wether or not the lock was obtained. |
| [in] | File | The filename from where the call was made. |
| [in] | Line | The line number from where the call was made. |
| LDASTools::AL::ReadWriteLock::ReadWriteLock | ( | baton_type | Lock, |
| mode_type | Mode, | ||
| int | Timeout, | ||
| const char * | Filename, | ||
| int | Linenum ) |
Constructor.
| [in] | Lock | Baton controlling access to the resource. |
| [in] | Mode | Any of the lock_modes. |
| [in] | Timeout | Time limit in seconds in which to acquire the lock. A value of zero (0) indicates that the method should wait until the lock is granted. |
| [in] | File | The filename from where the call was made. |
| [in] | Line | The line number from where the call was made. |
| LDASTools::AL::ReadWriteLock::ReadWriteLock | ( | baton_type | Lock, |
| mode_type | Mode, | ||
| const char * | Filename, | ||
| int | Linenum ) |
Constructor.
| [in] | Lock | Baton controlling access to the resource. |
| [in] | Mode | Any of the lock_modes. |
| [in] | File | The filename from where the call was made. |
| [in] | Line | The line number from where the call was made. |
| LDASTools::AL::ReadWriteLock::ReadWriteLock | ( | baton_type | Lock, |
| mode_type | Mode, | ||
| bool | TryLock, | ||
| const char * | Filename, | ||
| int | Linenum ) |
Constructor.
| [in] | Lock | Baton controlling access to the resource. |
| [in] | Mode | Any of the lock_modes. |
| [in] | TryLock | If true, then return immediately wether or not the lock was obtained. |
| [in] | File | The filename from where the call was made. |
| [in] | Line | The line number from where the call was made. |
| LDASTools::AL::ReadWriteLock::ReadWriteLock | ( | baton_type | Lock, |
| mode_type | Mode, | ||
| int | Timeout, | ||
| const char * | Filename, | ||
| int | Linenum ) |
Constructor.
| [in] | Lock | Baton controlling access to the resource. |
| [in] | Mode | Any of the lock_modes. |
| [in] | Timeout | Time limit in seconds in which to acquire the lock. A value of zero (0) indicates that the method should wait until the lock is granted. |
| [in] | File | The filename from where the call was made. |
| [in] | Line | The line number from where the call was made. |
|
virtual |
Destructor.
|
virtual |
Destructor.
|
static |
Create a baton that is appropriate for use with this class.
|
static |
Create a baton that is appropriate for use with this class.
|
static |
| void LDASTools::AL::ReadWriteLock::Modify | ( | mode_type | Mode, |
| const char * | Filename, | ||
| int | Linenum ) |
Modify the mode of lock being held on the resource.
| [in] | Mode | The new mode to be held on the resource. |
| [in] | File | The filename from where the call was made. |
| [in] | Line | The line number from where the call was made. |
| void LDASTools::AL::ReadWriteLock::Modify | ( | mode_type | Mode, |
| const char * | Filename, | ||
| int | Linenum ) |
Modify the mode of lock being held on the resource.
| [in] | Mode | The new mode to be held on the resource. |
| [in] | File | The filename from where the call was made. |
| [in] | Line | The line number from where the call was made. |
| void LDASTools::AL::ReadWriteLock::Release | ( | const char * | Filename, |
| int | Linenum ) |
Release the lock.
| [in] | File | The filename from where the call was made. |
| [in] | Line | The line number from where the call was made. |
| void LDASTools::AL::ReadWriteLock::Release | ( | const char * | Filename, |
| int | Linenum ) |
Release the lock.
| [in] | File | The filename from where the call was made. |
| [in] | Line | The line number from where the call was made. |
|
static |
Handler for thead cancelation.
| [in] | VLock | The VLock is a pointer to a ReadWriteLock object that holds a lock. |
|
static |
Handler for thead cancelation.
| [in] | VLock | The VLock is a pointer to a ReadWriteLock object that holds a lock. |
|
static |