Why: Locking#
-
class Mutex#
Public Functions
-
Mutex()#
-
~Mutex()#
-
void lock()#
Lock the mutex, blocking the caller until it is available. Not safe to call from an ISR!
Usage in an :cpp:class:
Why::IRQ
-
void unlock()#
Unlock the mutex, unlocking one (if any) waiter
Note that, although unlocking does not block the caller (the unlocker), its use from an ISR is undefined because a mutex has an owner - the thread that successfully locked it. Depending on the underlying OS configuration, the OS might check or not.
-
Mutex()#
-
class Spinlock#