Descibes an object which release a mutex lock.
More...
#include <mutexlock.hh>
|
| MutexLock (baton_type Baton, const char *const File, const unsigned int Line) |
| Constructor. More...
|
|
| ~MutexLock () |
| Destructor.
|
|
void | Release (const char *const File, const unsigned int Line) |
| Release the lock before object is destructed.
|
|
| MutexLock (baton_type Baton, const char *const File, const unsigned int Line) |
| Constructor. More...
|
|
| ~MutexLock () |
| Destructor.
|
|
void | Release (const char *const File, const unsigned int Line) |
| Release the lock before object is destructed.
|
|
| MutexLock (baton_type Baton, const char *const File, const unsigned int Line) |
| Constructor. More...
|
|
| ~MutexLock () |
| Destructor.
|
|
void | Release (const char *const File, const unsigned int Line) |
| Release the lock before object is destructed.
|
|
|
static baton_type | Baton () |
| Create a baton that is appropriate for use with this class.
|
|
static void | ThreadCancel (void *VLock, const char *File=__FILE__, const unsigned int Line=__LINE__) |
| 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, const char *File=__FILE__, const unsigned int Line=__LINE__) |
| 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, const char *File=__FILE__, const unsigned int Line=__LINE__) |
| Handler for thead cancelation. More...
|
|
Descibes an object which release a mutex lock.
This class ensures that the given mutex is unlocked whenever an exception is thrown but not caught in a locked section.
It should be used like this:
Creating two MutexLock objects with the same mutex in the same scope will cause a deadlock.
◆ MutexLock() [1/3]
LDASTools::AL::MutexLock::MutexLock |
( |
baton_type |
Baton, |
|
|
const char *const |
File, |
|
|
const unsigned int |
Line |
|
) |
| |
Constructor.
- Parameters
-
Baton | The object to provide lock syncronization. |
File | The from where the request was made. |
Line | The line number from where the request was made. |
This contructor creates an object to ensure the releasing of the exclusive lock once the object goes out of scope. The lock held by the object can be released early by calling the Release method.
\see Release
◆ MutexLock() [2/3]
LDASTools::AL::MutexLock::MutexLock |
( |
baton_type |
Baton, |
|
|
const char *const |
File, |
|
|
const unsigned int |
Line |
|
) |
| |
Constructor.
- Parameters
-
Baton | The object to provide lock syncronization. |
File | The from where the request was made. |
Line | The line number from where the request was made. |
◆ MutexLock() [3/3]
LDASTools::AL::MutexLock::MutexLock |
( |
baton_type |
Baton, |
|
|
const char *const |
File, |
|
|
const unsigned int |
Line |
|
) |
| |
Constructor.
- Parameters
-
Baton | The object to provide lock syncronization. |
File | The from where the request was made. |
Line | The line number from where the request was made. |
◆ ThreadCancel() [1/3]
void LDASTools::AL::MutexLock::ThreadCancel |
( |
void * |
VLock, |
|
|
const char * |
File = __FILE__ , |
|
|
const unsigned int |
Line = __LINE__ |
|
) |
| |
|
static |
Handler for thead cancelation.
- Parameters
-
[in] | VLock | The VLock is a pointer to a ReadWriteLock object that holds a lock. |
[in] | File | The file where the request was made. |
[in] | Line | The line number from where the request was made. |
This routine is used when a thread is canceled and the lock needs to be release. It is currently only written to support pthread_cancel_push().
◆ ThreadCancel() [2/3]
static void LDASTools::AL::MutexLock::ThreadCancel |
( |
void * |
VLock, |
|
|
const char * |
File = __FILE__ , |
|
|
const unsigned int |
Line = __LINE__ |
|
) |
| |
|
static |
Handler for thead cancelation.
- Parameters
-
[in] | VLock | The VLock is a pointer to a ReadWriteLock object that holds a lock. |
[in] | File | The file where the request was made. |
[in] | Line | The line number from where the request was made. |
◆ ThreadCancel() [3/3]
static void LDASTools::AL::MutexLock::ThreadCancel |
( |
void * |
VLock, |
|
|
const char * |
File = __FILE__ , |
|
|
const unsigned int |
Line = __LINE__ |
|
) |
| |
|
static |
Handler for thead cancelation.
- Parameters
-
[in] | VLock | The VLock is a pointer to a ReadWriteLock object that holds a lock. |
[in] | File | The file where the request was made. |
[in] | Line | The line number from where the request was made. |
The documentation for this class was generated from the following files:
- /build/ldas-tools-al-2.6.7/debian/tmp/usr/include/ldastoolsal/mutexlock.hh
- /build/ldas-tools-al-2.6.7/obj-x86_64-linux-gnu/include/ldastoolsal/mutexlock.hh
- /build/ldas-tools-al-2.6.7/src/mutexlock.hh
- /build/ldas-tools-al-2.6.7/src/mutexlock.cc