support dynamic task create in cmsis
1. enable TOS_CFG_TASK_DYNAMIC_CREATE_EN 2. use osThreadDynamicDef to define a dynamic created cmsis task 3. use osThreadCreate/osThreadTerminate to create/destroy this cmsis task 4. see sample hello_world
This commit is contained in:
@@ -176,7 +176,6 @@ __API__ k_err_t tos_task_destroy(k_task_t *task);
|
||||
* @brief Create a task with a dynamic allocated task handler and stack.
|
||||
* create a task with a dynamic allocated task handler and stack.
|
||||
*
|
||||
* @attention a task created by tos_task_create_dyn, should be destroyed by tos_task_destroy_dyn.
|
||||
* @param[out] task dynamic allocated task handler.
|
||||
* @param[in] name name of the task.
|
||||
* @param[in] entry running entry of the task.
|
||||
@@ -199,20 +198,6 @@ __API__ k_err_t tos_task_create_dyn(k_task_t **task,
|
||||
size_t stk_size,
|
||||
k_timeslice_t timeslice);
|
||||
|
||||
/**
|
||||
* @brief Destroy a dynamic created task.
|
||||
* delete a dynamic created task.
|
||||
*
|
||||
* @attention the API to destroy a dynamic created task.
|
||||
*
|
||||
* @param[in] task pointer to the handler of the task to be deleted.
|
||||
*
|
||||
* @return errcode
|
||||
* @retval #K_ERR_TASK_DESTROY_IDLE attempt to destroy idle task.
|
||||
* @retval #K_ERR_NONE return successfully.
|
||||
*/
|
||||
__API__ k_err_t tos_task_destroy_dyn(k_task_t *task);
|
||||
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user