Defines a group of APIs, which interface to RTOS mutex functionality.
More...
Defines a group of APIs, which interface to RTOS mutex functionality.
wiced_mutex_t* wiced_rtos_create_mutex |
( |
void |
| ) |
|
Allocates memory for a new mutex instance and returns the pointer.
Once created, the mutex must be initialized before use by calling wiced_rtos_init_mutex .
- Parameters
-
- Returns
- NULL an error occurred and the instance was not allocated, do not init
- valid pointer to mutex instance, which can now we initialized
Initialize the mutex created by wiced_rtos_create_mutex .
- Parameters
-
[in] | mutex | pointer to mutex instance |
- Returns
- WICED_SUCCESS
- WICED_ERROR
Lock the given mutex.
Blocks other threads from proceeding until the current thread releases the lock. If another thread already holds the lock, then the current thread will be suspended until released.
- Parameters
-
[in] | mutex | pointer to mutex instance |
- Returns
- WICED_SUCCESS
- WICED_ERROR
Release lock on mutex.
Other threads waiting for the mutex can now enter the critical section.
- Parameters
-
[in] | mutex | pointer to mutex instance |
- Returns
- WICED_SUCCESS
- WICED_ERROR