#include <LOW_link.h>
Inheritance diagram for LOW_link::commLock:
Public Member Functions | |
commLock (LOW_link &inLink) | |
Obtain the lock. | |
~commLock () | |
Release the lock. | |
Private Attributes | |
LOW_link & | link |
Reference to the link the lock is for. |
The class is intended to be used in a "locking is creation" design pattern. On creation an exclusive lock is optained for the device, 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 97 of file LOW_link.h.
|
Obtain the lock.
Definition at line 102 of file LOW_link.h. References LOW_link::__linkRecMutex, link, and LOW_thread_mutex::lock(). |
|
Release the lock.
Definition at line 109 of file LOW_link.h. References LOW_link::__linkRecMutex, link, and LOW_thread_mutex::unlock(). |
|
Reference to the link the lock is for.
Definition at line 115 of file LOW_link.h. Referenced by commLock(), and ~commLock(). |