5.11.0.0R3
Software Development Kit
 
Loading...
Searching...
No Matches
Semaphores

Functions

wiced_result_t wiced_rtos_deinit_semaphore (wiced_semaphore_t *semaphore)
 
wiced_result_t wiced_rtos_get_semaphore (wiced_semaphore_t *semaphore, uint32_t timeout_ms)
 
wiced_result_t wiced_rtos_init_semaphore (wiced_semaphore_t *semaphore)
 
wiced_result_t wiced_rtos_set_semaphore (wiced_semaphore_t *semaphore)
 

Detailed Description

Semaphore management functions

Function Documentation

◆ wiced_rtos_deinit_semaphore()

wiced_result_t wiced_rtos_deinit_semaphore ( wiced_semaphore_t * semaphore)

De-initialize a semaphore

Deletes a semaphore created with wiced_rtos_init_semaphore

Parameters
[in]semaphore: A pointer to the semaphore handle
Returns
WICED_SUCCESS : on success.
WICED_ERROR : if an error occurred

◆ wiced_rtos_get_semaphore()

wiced_result_t wiced_rtos_get_semaphore ( wiced_semaphore_t * semaphore,
uint32_t timeout_ms )

Get (wait/decrement) a semaphore

Attempts to get (wait/decrement) a semaphore. If semaphore is at zero already, then the calling thread will be suspended until another thread sets the semaphore with wiced_rtos_set_semaphore

Parameters
[in]semaphore: A pointer to the semaphore handle
[in]timeout_msThe number of milliseconds to wait before returning
Returns
WICED_SUCCESS : on success.
WICED_ERROR : if an error occurred

◆ wiced_rtos_init_semaphore()

wiced_result_t wiced_rtos_init_semaphore ( wiced_semaphore_t * semaphore)

Initializes a semaphore

Parameters
[in]semaphore: A pointer to the semaphore handle to be initialized
Returns
WICED_SUCCESS : on success.
WICED_ERROR : if an error occurred

◆ wiced_rtos_set_semaphore()

wiced_result_t wiced_rtos_set_semaphore ( wiced_semaphore_t * semaphore)

Set (post/put/increment) a semaphore

Parameters
[in]semaphore: A pointer to the semaphore handle to be set
Returns
WICED_SUCCESS : on success.
WICED_ERROR : if an error occurred