Collaboration diagram for LOW_helper_msglog::msgLock:
Public Member Functions | |
msgLock () | |
Obtain the lock. | |
~msgLock () | |
Release the lock. | |
Static Private Attributes | |
LOW_thread_mutex * | msgMutex = LOW_thread_Factory::new_mutex( LOW_thread_mutex::mutexKind_recursive) |
Recursive mutex used for locking. |
The class is intended to be used in a "locking is creation" design pattern. On creation an exclusive lock is optained, and on destruction the lock is released.
Uses a recursive mutex, i.e. does not distinguish reads/writes but my be called multiple times by the same thread without blocking.
Class is inlined for performance reasons.
Definition at line 143 of file LOW_helper_msglog.h.
|
Obtain the lock.
Definition at line 147 of file LOW_helper_msglog.h. References LOW_thread_mutex::lock(), and msgMutex. |
|
Release the lock.
Definition at line 154 of file LOW_helper_msglog.h. References msgMutex, and LOW_thread_mutex::unlock(). |
|
Recursive mutex used for locking.
Definition at line 196 of file LOW_helper_msglog.cpp. Referenced by msgLock(), and ~msgLock(). |