no-OS
Functions
freertos_mutex.c File Reference
#include <FreeRTOS.h>
#include "no_os_mutex.h"
#include "semphr.h"
#include "queue.h"
Include dependency graph for freertos_mutex.c:

Functions

void no_os_mutex_init (void **mutex)
 Initialize mutex. mutex - Pointer toward the mutex. More...
 
void no_os_mutex_lock (void *mutex)
 Lock mutex. mutex - Pointer toward the mutex. More...
 
 __attribute ((weak))
 Unlock mutex. mutex - Pointer toward the mutex. More...
 
void no_os_mutex_remove (void *mutex)
 Remove mutex. mutex - Pointer toward the mutex. More...
 

Function Documentation

◆ __attribute()

__attribute ( (weak)  )

Unlock mutex. mutex - Pointer toward the mutex.

Returns
None.

◆ no_os_mutex_init()

void no_os_mutex_init ( void **  mutex)
inline

Initialize mutex. mutex - Pointer toward the mutex.

Function for no-os mutex initialization and thread safety. This function is implemented based on different platforms/OS libraries that NO-OS supports. These mutex functions are used for thread safety of peripherals. Since these functions don't return error values it is the developers responsibility to implement the safety checks in case new mutex implementation is being added, like the following:

Returns
None.
Here is the caller graph for this function:

◆ no_os_mutex_lock()

void no_os_mutex_lock ( void *  mutex)
inline

Lock mutex. mutex - Pointer toward the mutex.

Function for locking mutex.

Returns
None.
Here is the caller graph for this function:

◆ no_os_mutex_remove()

void no_os_mutex_remove ( void *  mutex)
inline

Remove mutex. mutex - Pointer toward the mutex.

Function for removing the initialized mutex. This function is responsible to remove the allocated mutex. This function is also used by the peripherals mutex thread safety feature and in case new mutex implementation is going to be added, it is the developers responsibility to add extra check inside the function while de-allocating the memory.

Returns
None.
Here is the caller graph for this function: