Infineon Logo AIROC BTSDK v4.9 - Documentation
 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages

Defines a group of APIs, which interface to RTOS mutex functionality. More...

Functions

wiced_mutex_t * wiced_rtos_create_mutex (void)
 Allocates memory for a new mutex instance and returns the pointer. More...
 
wiced_result_t wiced_rtos_init_mutex (wiced_mutex_t *mutex)
 Initialize the mutex created by wiced_rtos_create_mutex . More...
 
wiced_result_t wiced_rtos_lock_mutex (wiced_mutex_t *mutex)
 Lock the given mutex. More...
 
wiced_result_t wiced_rtos_unlock_mutex (wiced_mutex_t *mutex)
 Release lock on mutex. More...
 

Detailed Description

Defines a group of APIs, which interface to RTOS mutex functionality.

Function Documentation

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
void
Returns
  • NULL an error occurred and the instance was not allocated, do not init
  • valid pointer to mutex instance, which can now we initialized
wiced_result_t wiced_rtos_init_mutex ( wiced_mutex_t *  mutex)

Initialize the mutex created by wiced_rtos_create_mutex .

Parameters
[in]mutexpointer to mutex instance
Returns
  • WICED_SUCCESS
  • WICED_ERROR
wiced_result_t wiced_rtos_lock_mutex ( wiced_mutex_t *  mutex)

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]mutexpointer to mutex instance
Returns
  • WICED_SUCCESS
  • WICED_ERROR
wiced_result_t wiced_rtos_unlock_mutex ( wiced_mutex_t *  mutex)

Release lock on mutex.

Other threads waiting for the mutex can now enter the critical section.

Parameters
[in]mutexpointer to mutex instance
Returns
  • WICED_SUCCESS
  • WICED_ERROR