nl::Weave::System::Mutex
Stay organized with collections
Save and categorize content based on your preferences.
#include <src/system/SystemMutex.h>
This class represents a simple mutual exclusion lock used on platforms with preemptively scheduled multi-threaded programming environments, for example, POSIX threads and FreeRTOS.
Summary
The lock is non-recursive, and may not be used in a hardware interrupt context. The constructor and destructor are defined as null functions to facilitate using objects with static
storage duration and uninitialized memory. Use Init
method to initialize. The copy/move operators are not provided.
Public functions |
|
---|---|
Lock(void)
|
void
Acquire the mutual exclusion lock, blocking the current thread indefinitely if necessary.
|
Unlock(void)
|
void
Release the mutual exclusion lock (can block on some systems until scheduler completes).
|
Public functions
Lock
void Lock( void )
Acquire the mutual exclusion lock, blocking the current thread indefinitely if necessary.
Mutex
Mutex( void )
Unlock
void Unlock( void )
Release the mutual exclusion lock (can block on some systems until scheduler completes).