AIROC™ BTSDK v4.7 - Documentation | ||||
Semaphore management functionss. More...
Functions | |
wiced_semaphore_t * | wiced_rtos_create_semaphore (void) |
Creates a new instance of semaphore. More... | |
wiced_result_t | wiced_rtos_init_semaphore (wiced_semaphore_t *semaphore) |
Initialises a semaphore. More... | |
wiced_result_t | wiced_rtos_set_semaphore (wiced_semaphore_t *semaphore) |
Set (post/put/increment) a semaphore. More... | |
wiced_result_t | wiced_rtos_get_semaphore (wiced_semaphore_t *semaphore, uint32_t timeout_ms) |
Get (wait/decrement) a semaphore. More... | |
Semaphore management functionss.
wiced_semaphore_t* wiced_rtos_create_semaphore | ( | void | ) |
Creates a new instance of semaphore.
Creates a new semaphore (Allocates memory for a new semaphore instance and returns the pointer)
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
semaphore | : a pointer to the semaphore handle |
timeout_ms | the number of milliseconds to wait before returning |
wiced_result_t wiced_rtos_init_semaphore | ( | wiced_semaphore_t * | semaphore | ) |
Initialises a semaphore.
Initialises a counting semaphore
semaphore | : a pointer to the semaphore handle to be initialised |
wiced_result_t wiced_rtos_set_semaphore | ( | wiced_semaphore_t * | semaphore | ) |
Set (post/put/increment) a semaphore.
Set (post/put/increment) a semaphore
semaphore | : a pointer to the semaphore handle to be set |