#include <mythlocked.h>
This implements a "guard" pattern
Definition at line 30 of file mythlocked.h.
◆ LockGuard()
Initialize a guard which hold the lock. The lock will be released by the destructor.
- Parameters
-
lock | The pointer to lockable object |
Definition at line 35 of file mythlocked.cpp.
◆ ClearLock()
void LockGuard::ClearLock |
( |
Lockable * |
lock | ) |
|
|
static |
Return once recursive count has been cleared and the lock is released.
- Parameters
-
Definition at line 66 of file mythlocked.cpp.
◆ CreateLock()
Create a new lockable object. The allocated resource must be freed by calling DestroyLock.
- Returns
- The pointer to the new lockable object
Definition at line 46 of file mythlocked.cpp.
◆ DestroyLock()
void LockGuard::DestroyLock |
( |
Lockable * |
lock | ) |
|
|
static |
Destroy lockable object previously allocated with CreateLock.
- Parameters
-
lock | The pointer to lockable object |
Definition at line 51 of file mythlocked.cpp.
◆ Lock()
Return once the lock is held and recursive count has been incremented.
- Parameters
-
lock | The pointer to lockable object |
Definition at line 56 of file mythlocked.cpp.
◆ Unlock()
void LockGuard::Unlock |
( |
Lockable * |
lock | ) |
|
|
static |
Return once the lock is released or recursive count has been decremented.
- Parameters
-
lock | The pointer to lockable object |
Definition at line 61 of file mythlocked.cpp.
The documentation for this class was generated from the following files: