const bool LZ_CONFIG_CHECK_NULL_PARAMETERS_IN_MUTEXES
When 1, always check for NULL functions parameters in mutexes implementation.
Task * Scheduler_GetCurrentTask(void)
Get a pointer to the current running task.
void Task_Abort(void)
Abort the calling task.
void Arch_DisableInterrupts(void)
Disable all interrupts.
static void InitMutex(Lz_Mutex *const mutex, const Lz_Mutex *const initValue)
Initialize a mutex in a given state.
void Arch_EnableInterrupts(void)
Enable all interrupts.
void Scheduler_SleepUntilEndOfTimeSlice(void)
Put the current task to sleep until the end of its time slice.
Include appropriate config file.
#define LZ_MUTEX_INIT
Define the value to initialize a Lz_Mutex in the unlocked state.
#define WAIT_MUTEX
Wait for a mutex to be unlocked.
static Task * currentTask
A pointer to the current running task.
Lazuli scheduler interface.
volatile lz_task_to_scheduler_message_t taskToSchedulerMessage
The message the task has to pass to the scheduler for the next scheduling operation (i...
bool Arch_TryAcquireLock(volatile uint8_t *const lock)
Try to acquire a lock by atomically changing the value pointed by the lock parameter.
void Lz_Mutex_Init(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.
static void WaitMutex(Lz_Mutex *const mutex)
Set the task to wait for a given mutex to be unlocked.
volatile uint8_t lock
The mutex lock.
void Memory_Copy(const void *source, void *destination, const size_t size)
Copy bytes from one location to another in main memory.
void Lz_Mutex_Unlock(Lz_Mutex *const mutex)
Unlock the mutex and leave critical section.
void Lz_Mutex_InitLocked(Lz_Mutex *const mutex)
Initialize an already allocated Lz_Mutex.
#define NULL
NULL pointer.
Base task definition and context description.
Architecture Abstraction API.
void Scheduler_WakeupTasksWaitingMutex(Lz_Mutex *const mutex)
Wake up all tasks waiting for a mutex.
#define LZ_MUTEX_INIT_LOCKED
Define the value to initialize a Lz_Mutex in the locked state.
void * taskToSchedulerMessageParameter
A parameter that can accompany a taskToSchedulerMessage.