15 #ifndef LAZULI_MUTEX_H 16 #define LAZULI_MUTEX_H 39 #define LZ_MUTEX_INIT { 0, LINKED_LIST_INIT } 47 #define LZ_MUTEX_INIT_LOCKED { 1, LINKED_LIST_INIT } #define _EXTERN_C_DECL_BEGIN
Open C++ header file declarations.
Lz_LinkedList waitingTasks
The list of tasks waiting for that mutex.
void Lz_Mutex_Init(Lz_Mutex *const mutex)
Initialize an already allocated Lz_Mutex.
volatile uint8_t lock
The mutex lock.
Doubly linked lists interface.
Represents the main container for doubly linked elements.
unsigned char uint8_t
Represents a unsigned integer type with width of exactly 8 bits.
void Lz_Mutex_InitLocked(Lz_Mutex *const mutex)
Initialize an already allocated Lz_Mutex.
void Lz_Mutex_Lock(Lz_Mutex *const mutex)
Lock the mutex and enter critical section.
Basic type definitions and useful macros.
#define _EXTERN_C_DECL_END
Close C++ header file declarations.
void Lz_Mutex_Unlock(Lz_Mutex *const mutex)
Unlock the mutex and leave critical section.