AIROC™ BTSDK v4.9 - Documentation | ||||
Thread management functions. More...
Functions | |
wiced_thread_t * | wiced_rtos_create_thread (void) |
Creates a new instance of thread. More... | |
wiced_bool_t | wiced_rtos_check_for_stack_overflow (void) |
Checks if there is a stackoverflow. More... | |
uint32_t | wiced_bt_rtos_max_stack_use (wiced_thread_t *thread) |
Description: returns maximum stack usage of the thread. More... | |
wiced_result_t | wiced_rtos_init_thread (wiced_thread_t *thread, uint8_t priority, const char *name, wiced_thread_function_t function, uint32_t stack_size, void *arg) |
Initializes and starts a new thread. More... | |
wiced_result_t | wiced_rtos_thread_join (wiced_thread_t *thread) |
Sleeps until another thread has terminated. More... | |
wiced_result_t | wiced_rtos_thread_force_awake (wiced_thread_t *thread) |
Forcibly wakes another thread. More... | |
wiced_result_t | wiced_rtos_is_current_thread (wiced_thread_t *thread) |
Checks if a thread is the current thread. More... | |
Thread management functions.
uint32_t wiced_bt_rtos_max_stack_use | ( | wiced_thread_t * | thread | ) |
Description: returns maximum stack usage of the thread.
[in] | thread | : point to the thread context Note: thread is a return value from wiced_rtos_create_thread() |
wiced_bool_t wiced_rtos_check_for_stack_overflow | ( | void | ) |
Checks if there is a stackoverflow.
Verifies if the stack of the thread from which this API is invoked is corrupted
wiced_thread_t* wiced_rtos_create_thread | ( | void | ) |
Creates a new instance of thread.
Creates a new thread (Allocates memory for a new thread instance and returns the pointer)
wiced_result_t wiced_rtos_init_thread | ( | wiced_thread_t * | thread, |
uint8_t | priority, | ||
const char * | name, | ||
wiced_thread_function_t | function, | ||
uint32_t | stack_size, | ||
void * | arg | ||
) |
Initializes and starts a new thread.
Initializes and starts a new thread
thread | : Pointer to variable that will receive the thread handle |
priority | : A priority number or WICED_DEFAULT_APP_THREAD_PRIORITY. |
name | : a text name for the thread (can be null) |
function | : the main thread function |
stack_size | : stack size for this thread |
arg | : argument which will be passed to thread function |
wiced_result_t wiced_rtos_is_current_thread | ( | wiced_thread_t * | thread | ) |
Checks if a thread is the current thread.
Checks if a specified thread is the currently running thread
thread | : the handle of the other thread against which the current thread will be compared |
wiced_result_t wiced_rtos_thread_force_awake | ( | wiced_thread_t * | thread | ) |
Forcibly wakes another thread.
Causes the specified thread to wake from suspension. This will usually cause an error or timeout in that thread, since the task it was waiting on is not complete.
thread | : the handle of the other thread which will be woken |
wiced_result_t wiced_rtos_thread_join | ( | wiced_thread_t * | thread | ) |
Sleeps until another thread has terminated.
Causes the current thread to sleep until the specified other thread has terminated. If the processor is heavily loaded with higher priority tasks, this thread may not wake until significantly after the thread termination.
thread | : the handle of the other thread which will terminate |