AIROC™ BTSDK v4.9 - Documentation | ||||
Mutex management functionss. More...
Functions | |
wiced_result_t | wiced_rtos_init_mutex (wiced_mutex_t *mutex) |
Initialises a mutex. More... | |
wiced_mutex_t * | wiced_rtos_create_mutex (void) |
Creates a new instance of mutex. More... | |
wiced_result_t | wiced_rtos_lock_mutex (wiced_mutex_t *mutex) |
Obtains the lock on a mutex. More... | |
wiced_result_t | wiced_rtos_unlock_mutex (wiced_mutex_t *mutex) |
Releases the lock on a mutex. More... | |
Mutex management functionss.
wiced_mutex_t* wiced_rtos_create_mutex | ( | void | ) |
Creates a new instance of mutex.
Creates a new mutex (Allocates memory for a new mutex instance and returns the pointer)
wiced_result_t wiced_rtos_init_mutex | ( | wiced_mutex_t * | mutex | ) |
Initialises a mutex.
Initialises a mutex A mutex is different to a semaphore in that a thread that already holds the lock on the mutex can request the lock again (nested) without causing it to be suspended.
mutex | : a pointer to the mutex handle to be initialised |
wiced_result_t wiced_rtos_lock_mutex | ( | wiced_mutex_t * | mutex | ) |
Obtains the lock on a mutex.
Attempts to obtain the lock on a mutex. If the lock is already held by another thead, the calling thread will be suspended until the mutex lock is released by the other thread.
mutex | : a pointer to the mutex handle to be locked |
wiced_result_t wiced_rtos_unlock_mutex | ( | wiced_mutex_t * | mutex | ) |
Releases the lock on a mutex.
Releases a currently held lock on a mutex. If another thread is waiting on the mutex lock, then it will be resumed.
mutex | : a pointer to the mutex handle to be unlocked |