FreeRTOS Addons
|
#include <mutex.hpp>
Public Member Functions | |
LockGuard (Mutex &m) | |
~LockGuard () | |
Synchronization helper class that leverages the C++ language to help prevent deadlocks. This is a C++11 feature that allows Mutex Locking and Unlocking to behave following an RAII style. The constructor of this helper object locks the Mutex. The destructor unlocks the Mutex. Since C++ guarantees that an object's desctuctor is always called when it goes out of scope, calls to Unlock become unnecessary and are in fact guaranteed as long as correct scoping is used.
|
explicit |