Mbed OS Reference
|
RAII-style mechanism for owning a lock of Lockable object for the duration of a scoped block. More...
#include <ScopedLock.h>
Public Member Functions | |
ScopedLock (Lockable &lockable) | |
Locks given lockable object. More... | |
RAII-style mechanism for owning a lock of Lockable object for the duration of a scoped block.
Lockable | The type implementing BasicLockable concept |
Usage:
Example with rtos::Mutex
More generic example
Definition at line 63 of file ScopedLock.h.
ScopedLock | ( | Lockable & | lockable | ) |
Locks given lockable object.
lockable | reference to the instance of Lockable object |
Definition at line 70 of file ScopedLock.h.