modm API documentation
|
#include <modm/processing/rtos/mutex.hpp>
Public Member Functions | |
bool | acquire (TickType_t timeout=portMAX_DELAY) |
void | release () |
Mutexes and binary semaphores are very similar but have some subtle differences: Mutexes include a priority inheritance mechanism, binary semaphores do not.
This makes binary semaphores the better choice for implementing synchronisation (between threads or between threads and an interrupt), and mutexes the better choice for implementing simple mutual exclusion.