separate the dynamic task destroy api

This commit is contained in:
mculover666
2022-05-31 19:42:25 +08:00
parent 088e7fe364
commit 30832d6e0f
4 changed files with 75 additions and 27 deletions

View File

@@ -204,6 +204,20 @@ __API__ k_err_t tos_task_create_dyn(k_task_t **task,
size_t stk_size,
k_timeslice_t timeslice);
/**
* @brief Destroy a dynamic allocated task.
* delete a dynamic allocated task.
*
* @attention None
*
* @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
/**