Implements read/write lock symantics.
More...
#include <ReadWriteLock.hh>
Inherits baton_type::impl::LockAcquisitionInterval.
|
| ReadWriteLock (baton_type Lock, mode_type Mode, const char *Filename, int Linenum) |
| Constructor. More...
|
|
| ReadWriteLock (baton_type Lock, mode_type Mode, bool TryLock, const char *Filename, int Linenum) |
| Constructor. More...
|
|
| ReadWriteLock (baton_type Lock, mode_type Mode, int Timeout, const char *Filename, int Linenum) |
| Constructor. More...
|
|
virtual | ~ReadWriteLock () |
| Destructor.
|
|
void | Modify (mode_type Mode, const char *Filename, int Linenum) |
| Modify the mode of lock being held on the resource. More...
|
|
void | Release (const char *Filename, int Linenum) |
| Release the lock. More...
|
|
| ReadWriteLock (baton_type Lock, mode_type Mode, const char *Filename, int Linenum) |
| Constructor. More...
|
|
| ReadWriteLock (baton_type Lock, mode_type Mode, bool TryLock, const char *Filename, int Linenum) |
| Constructor. More...
|
|
| ReadWriteLock (baton_type Lock, mode_type Mode, int Timeout, const char *Filename, int Linenum) |
| Constructor. More...
|
|
virtual | ~ReadWriteLock () |
| Destructor.
|
|
void | Modify (mode_type Mode, const char *Filename, int Linenum) |
| Modify the mode of lock being held on the resource. More...
|
|
void | Release (const char *Filename, int Linenum) |
| Release the lock. More...
|
|
| ReadWriteLock (baton_type Lock, mode_type Mode, const char *Filename, int Linenum) |
| Constructor. More...
|
|
| ReadWriteLock (baton_type Lock, mode_type Mode, bool TryLock, const char *Filename, int Linenum) |
| Constructor. More...
|
|
| ReadWriteLock (baton_type Lock, mode_type Mode, int Timeout, const char *Filename, int Linenum) |
| Constructor. More...
|
|
virtual | ~ReadWriteLock () |
| Destructor.
|
|
void | Modify (mode_type Mode, const char *Filename, int Linenum) |
| Modify the mode of lock being held on the resource. More...
|
|
void | Release (const char *Filename, int Linenum) |
| Release the lock. More...
|
|
|
static baton_type | Baton () |
| Create a baton that is appropriate for use with this class.
|
|
static void | ThreadCancel (void *VLock) |
| Handler for thead cancelation. More...
|
|
static baton_type | Baton () |
| Create a baton that is appropriate for use with this class.
|
|
static void | ThreadCancel (void *VLock) |
| Handler for thead cancelation. More...
|
|
static baton_type | Baton () |
| Create a baton that is appropriate for use with this class.
|
|
static void | ThreadCancel (void *VLock) |
| Handler for thead cancelation. More...
|
|
Implements read/write lock symantics.
This class provides proper garbage collection of system resource used to implement thread safe read/write locks.
void
threaded_func()
{
__FILE__, __LINE__ );
...
}
◆ lock_mode [1/3]
Lock mode.
Enumerator |
---|
READ | < Initial mode
|
WRITE | < Read lock allows multiple concurrent reads.
|
READ | < Initial mode
|
WRITE | < Read lock allows multiple concurrent reads.
|
READ | < Initial mode
|
WRITE | < Read lock allows multiple concurrent reads.
|
◆ lock_mode [2/3]
Lock mode.
Enumerator |
---|
READ | < Initial mode
|
WRITE | < Read lock allows multiple concurrent reads.
|
READ | < Initial mode
|
WRITE | < Read lock allows multiple concurrent reads.
|
READ | < Initial mode
|
WRITE | < Read lock allows multiple concurrent reads.
|
◆ lock_mode [3/3]
Lock mode.
Enumerator |
---|
READ | < Initial mode
|
WRITE | < Read lock allows multiple concurrent reads.
|
READ | < Initial mode
|
WRITE | < Read lock allows multiple concurrent reads.
|
READ | < Initial mode
|
WRITE | < Read lock allows multiple concurrent reads.
|
◆ lock_state [1/3]
Lock state.
Enumerator |
---|
PENDING | < Initial state
|
ACTIVE | < Lock requested
|
PENDING | < Initial state
|
ACTIVE | < Lock requested
|
PENDING | < Initial state
|
ACTIVE | < Lock requested
|
◆ lock_state [2/3]
Lock state.
Enumerator |
---|
PENDING | < Initial state
|
ACTIVE | < Lock requested
|
PENDING | < Initial state
|
ACTIVE | < Lock requested
|
PENDING | < Initial state
|
ACTIVE | < Lock requested
|
◆ lock_state [3/3]
Lock state.
Enumerator |
---|
PENDING | < Initial state
|
ACTIVE | < Lock requested
|
PENDING | < Initial state
|
ACTIVE | < Lock requested
|
PENDING | < Initial state
|
ACTIVE | < Lock requested
|
◆ ReadWriteLock() [1/9]
LDASTools::AL::ReadWriteLock::ReadWriteLock |
( |
baton_type |
Lock, |
|
|
mode_type |
Mode, |
|
|
const char * |
Filename, |
|
|
int |
Linenum |
|
) |
| |
Constructor.
- Parameters
-
[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. |
◆ ReadWriteLock() [2/9]
LDASTools::AL::ReadWriteLock::ReadWriteLock |
( |
baton_type |
Lock, |
|
|
mode_type |
Mode, |
|
|
bool |
TryLock, |
|
|
const char * |
Filename, |
|
|
int |
Linenum |
|
) |
| |
Constructor.
- Parameters
-
[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. |
◆ ReadWriteLock() [3/9]
LDASTools::AL::ReadWriteLock::ReadWriteLock |
( |
baton_type |
Lock, |
|
|
mode_type |
Mode, |
|
|
int |
Timeout, |
|
|
const char * |
Filename, |
|
|
int |
Linenum |
|
) |
| |
Constructor.
- Parameters
-
[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. |
◆ ReadWriteLock() [4/9]
LDASTools::AL::ReadWriteLock::ReadWriteLock |
( |
baton_type |
Lock, |
|
|
mode_type |
Mode, |
|
|
const char * |
Filename, |
|
|
int |
Linenum |
|
) |
| |
Constructor.
- Parameters
-
[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. |
◆ ReadWriteLock() [5/9]
LDASTools::AL::ReadWriteLock::ReadWriteLock |
( |
baton_type |
Lock, |
|
|
mode_type |
Mode, |
|
|
bool |
TryLock, |
|
|
const char * |
Filename, |
|
|
int |
Linenum |
|
) |
| |
Constructor.
- Parameters
-
[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. |
◆ ReadWriteLock() [6/9]
LDASTools::AL::ReadWriteLock::ReadWriteLock |
( |
baton_type |
Lock, |
|
|
mode_type |
Mode, |
|
|
int |
Timeout, |
|
|
const char * |
Filename, |
|
|
int |
Linenum |
|
) |
| |
Constructor.
- Parameters
-
[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. |
◆ ReadWriteLock() [7/9]
LDASTools::AL::ReadWriteLock::ReadWriteLock |
( |
baton_type |
Lock, |
|
|
mode_type |
Mode, |
|
|
const char * |
Filename, |
|
|
int |
Linenum |
|
) |
| |
Constructor.
- Parameters
-
[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. |
◆ ReadWriteLock() [8/9]
LDASTools::AL::ReadWriteLock::ReadWriteLock |
( |
baton_type |
Lock, |
|
|
mode_type |
Mode, |
|
|
bool |
TryLock, |
|
|
const char * |
Filename, |
|
|
int |
Linenum |
|
) |
| |
Constructor.
- Parameters
-
[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. |
◆ ReadWriteLock() [9/9]
LDASTools::AL::ReadWriteLock::ReadWriteLock |
( |
baton_type |
Lock, |
|
|
mode_type |
Mode, |
|
|
int |
Timeout, |
|
|
const char * |
Filename, |
|
|
int |
Linenum |
|
) |
| |
Constructor.
- Parameters
-
[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. |
◆ Modify() [1/3]
void LDASTools::AL::ReadWriteLock::Modify |
( |
mode_type |
Mode, |
|
|
const char * |
Filename, |
|
|
int |
Linenum |
|
) |
| |
Modify the mode of lock being held on the resource.
- Parameters
-
[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. |
◆ Modify() [2/3]
void LDASTools::AL::ReadWriteLock::Modify |
( |
mode_type |
Mode, |
|
|
const char * |
Filename, |
|
|
int |
Linenum |
|
) |
| |
Modify the mode of lock being held on the resource.
- Parameters
-
[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. |
◆ Modify() [3/3]
void LDASTools::AL::ReadWriteLock::Modify |
( |
mode_type |
Mode, |
|
|
const char * |
Filename, |
|
|
int |
Linenum |
|
) |
| |
Modify the mode of lock being held on the resource.
- Parameters
-
[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. |
◆ Release() [1/3]
void LDASTools::AL::ReadWriteLock::Release |
( |
const char * |
Filename, |
|
|
int |
Linenum |
|
) |
| |
Release the lock.
- Parameters
-
[in] | File | The filename from where the call was made. |
[in] | Line | The line number from where the call was made. |
◆ Release() [2/3]
void LDASTools::AL::ReadWriteLock::Release |
( |
const char * |
Filename, |
|
|
int |
Linenum |
|
) |
| |
Release the lock.
- Parameters
-
[in] | File | The filename from where the call was made. |
[in] | Line | The line number from where the call was made. |
◆ Release() [3/3]
void LDASTools::AL::ReadWriteLock::Release |
( |
const char * |
Filename, |
|
|
int |
Linenum |
|
) |
| |
Release the lock.
- Parameters
-
[in] | File | The filename from where the call was made. |
[in] | Line | The line number from where the call was made. |
◆ ThreadCancel() [1/3]
static void LDASTools::AL::ReadWriteLock::ThreadCancel |
( |
void * |
VLock | ) |
|
|
static |
Handler for thead cancelation.
- Parameters
-
[in] | VLock | The VLock is a pointer to a ReadWriteLock object that holds a lock. |
◆ ThreadCancel() [2/3]
static void LDASTools::AL::ReadWriteLock::ThreadCancel |
( |
void * |
VLock | ) |
|
|
static |
Handler for thead cancelation.
- Parameters
-
[in] | VLock | The VLock is a pointer to a ReadWriteLock object that holds a lock. |
◆ ThreadCancel() [3/3]
static void LDASTools::AL::ReadWriteLock::ThreadCancel |
( |
void * |
VLock | ) |
|
|
static |
Handler for thead cancelation.
- Parameters
-
[in] | VLock | The VLock is a pointer to a ReadWriteLock object that holds a lock. |
The documentation for this class was generated from the following files:
- /build/ldas-tools-al/debian/tmp/usr/include/ldastoolsal/ReadWriteLock.hh
- /build/ldas-tools-al/obj-x86_64-linux-gnu/include/ldastoolsal/ReadWriteLock.hh
- /build/ldas-tools-al/src/ReadWriteLock.hh
- /build/ldas-tools-al/src/ReadWriteLock.cc