no-OS
Functions
no_os_mutex.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void no_os_mutex_init (void **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: More...
 
void no_os_mutex_lock (void *mutex)
 Function for locking mutex. More...
 
void no_os_mutex_unlock (void *mutex)
 Function for unlocking mutex. More...
 
void no_os_mutex_remove (void *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. More...
 

Function Documentation

◆ no_os_mutex_init()

void no_os_mutex_init ( void **  mutex)
inline

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:

if ((*mutex) == NULL) { //code to initialize the mutex }

Also these check are responsible not to allocate different mutexes for the same peripheral descriptor.

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

Function for locking 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

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.

if (mutex != NULL) { //code to de-allocate 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:

◆ no_os_mutex_unlock()

void no_os_mutex_unlock ( void *  mutex)

Function for unlocking mutex.

Here is the caller graph for this function: