Descibes an object which release a mutex lock.
More...
#include <mutexlock.hh>
|
static baton_type | Baton () |
| Create a baton that is appropriate for use with this class. More...
|
|
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. More...
|
|
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. More...
|
|
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/9]
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() [1/3]
LDASTools::AL::MutexLock::~MutexLock |
( |
| ) |
|
◆ MutexLock() [2/9]
LDASTools::AL::MutexLock::MutexLock |
( |
| ) |
|
|
private |
Default Constructor.
Default constructor is private to prevent copying of classes internal data.
◆ MutexLock() [3/9]
LDASTools::AL::MutexLock::MutexLock |
( |
const MutexLock & |
| ) |
|
|
private |
Copy Constructor.
Copy constructor is private to prevent copying of classes internal data.
◆ MutexLock() [4/9]
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() [2/3]
LDASTools::AL::MutexLock::~MutexLock |
( |
| ) |
|
◆ MutexLock() [5/9]
LDASTools::AL::MutexLock::MutexLock |
( |
| ) |
|
|
private |
Default Constructor.
Default constructor is private to prevent copying of classes internal data.
◆ MutexLock() [6/9]
LDASTools::AL::MutexLock::MutexLock |
( |
const MutexLock & |
| ) |
|
|
private |
Copy Constructor.
Copy constructor is private to prevent copying of classes internal data.
◆ MutexLock() [7/9]
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 |
( |
| ) |
|
◆ MutexLock() [8/9]
LDASTools::AL::MutexLock::MutexLock |
( |
| ) |
|
|
private |
Default Constructor.
Default constructor is private to prevent copying of classes internal data.
◆ MutexLock() [9/9]
LDASTools::AL::MutexLock::MutexLock |
( |
const MutexLock & |
| ) |
|
|
private |
Copy Constructor.
Copy constructor is private to prevent copying of classes internal data.
◆ Baton() [1/3]
Create a baton that is appropriate for use with this class.
◆ Baton() [2/3]
static baton_type LDASTools::AL::MutexLock::Baton |
( |
| ) |
|
|
static |
Create a baton that is appropriate for use with this class.
◆ Baton() [3/3]
static baton_type LDASTools::AL::MutexLock::Baton |
( |
| ) |
|
|
static |
Create a baton that is appropriate for use with this class.
◆ operator=() [1/3]
Assigment operator.
Assignment operator is privat to prevent copying of classes internal data
◆ operator=() [2/3]
Assigment operator.
Assignment operator is privat to prevent copying of classes internal data
◆ operator=() [3/3]
Assigment operator.
Assignment operator is privat to prevent copying of classes internal data
◆ Release() [1/3]
void LDASTools::AL::MutexLock::Release |
( |
const char *const |
File, |
|
|
const unsigned int |
Line |
|
) |
| |
Release the lock before object is destructed.
◆ Release() [2/3]
void LDASTools::AL::MutexLock::Release |
( |
const char *const |
File, |
|
|
const unsigned int |
Line |
|
) |
| |
Release the lock before object is destructed.
◆ Release() [3/3]
void LDASTools::AL::MutexLock::Release |
( |
const char *const |
File, |
|
|
const unsigned int |
Line |
|
) |
| |
Release the lock before object is destructed.
◆ 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. |
◆ baton
Object to prevent multiple access to critical sections of code.
◆ m_logging
bool LDASTools::AL::MutexLock::m_logging |
|
private |
Keeps track of logging state.
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