Defines a group of APIs, which interface to RTOS multithreading functionality contained in ROM.
More...
Defines a group of APIs, which interface to RTOS multithreading functionality contained in ROM.
uint32_t wiced_bt_rtos_max_stack_use |
( |
wiced_thread_t * |
thread | ) |
|
Returns maximum stack usage size if thread signature is valid, else returns 0.
- Parameters
-
- Returns
- maximum stack usage
wiced_bool_t wiced_rtos_check_for_stack_overflow |
( |
void |
| ) |
|
Verifies if the stack of current thread is corrupted.
- Parameters
-
- Returns
-
wiced_thread_t* wiced_rtos_create_thread |
( |
void |
| ) |
|
Allocates memory for a new thread instance and returns the pointer.
- Parameters
-
- Returns
- NULL an error occured and the instance was not allocated, do not init
- valid pointer to thread instance, which can now we initialized
Causes the current thread to block for AT LEAST the specified number of microseconds.
If the processor is heavily loaded with higher priority tasks, the delay may be much longer than requested.
- Parameters
-
[in] | microseconds | microseconds to delay current thread |
- Returns
- WICED_SUCCESS
- WICED_ERROR
- Note
- All threads with equal or lower priority than the current thread will not be able to run while the delay is occurring.
Causes the current thread to block for AT LEAST the specified number of milliseconds.
If the processor is heavily loaded with higher priority tasks, the delay may be much longer than requested.
- Parameters
-
[in] | milliseconds | milliseconds to delay current thread |
[in] | delay_type | ALLOW_THREAD_TO_SLEEP or KEEP_THREAD_ACTIVE |
- Returns
- WICED_SUCCESS
- WICED_ERROR
Initializes the thread instance created by wiced_rtos_create_thread .
Thread is then started in callback 'function' using given parameters.
- Parameters
-
[in] | thread | pointer to thread instance to wait for |
[in] | priority | THREAD_PRIORITY_MIN=0 to THREAD_PRIORITY_MAX=7 |
[in] | name | ASCII name for the thread (NULL is allowed) |
[in] | function | main thread function |
[in] | stack_size | num bytes allocated for thread stack |
[in] | arg | argument which will be passed to thread function |
- Returns
- WICED_SUCCESS
- WICED_ERROR
wiced_result_t wiced_rtos_is_current_thread |
( |
wiced_thread_t * |
thread | ) |
|
Checks if a specified thread is the currently running thread.
- Parameters
-
[in] | thread | pointer to thread instance |
- Returns
- WICED_SUCCESS indicates that the current thread is that passed as param
- WICED_ERROR indicates that the current thread is not that passed as param
wiced_result_t wiced_rtos_thread_force_awake |
( |
wiced_thread_t * |
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.
- Parameters
-
[in] | thread | pointer to thread instance |
- Returns
- WICED_SUCCESS
- WICED_ERROR
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.
- Parameters
-
[in] | thread | pointer to thread instance to wait for |
- Returns
- WICED_SUCCESS
- WICED_ERROR
uint32_t wiced_rtos_thread_stack_size |
( |
wiced_thread_t * |
thread | ) |
|
Returns stack size if thread signature is valid, else returns 0.
- Parameters
-
- Returns
- size as uint32_t
- 0 if thread pointer is invalid