![]() |
no-OS
|
Functions | |
| void | no_os_mutex_init (void **mutex) |
| Initialize mutex. mutex - Pointer toward the mutex. | |
| void | no_os_mutex_lock (void *mutex) |
| Lock mutex. mutex - Pointer toward the mutex. | |
| __attribute ((weak)) | |
| Unlock mutex. mutex - Pointer toward the mutex. | |
| void | no_os_mutex_remove (void *mutex) |
| Remove mutex. mutex - Pointer toward the mutex. | |
| __attribute | ( | (weak) | ) |
Unlock mutex. mutex - Pointer toward the mutex.
| void no_os_mutex_init | ( | void ** | mutex | ) |
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:
| void no_os_mutex_lock | ( | void * | mutex | ) |
Lock mutex. mutex - Pointer toward the mutex.
Function for locking mutex.
| void no_os_mutex_remove | ( | void * | mutex | ) |
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.