kernel_perf: update to 2.5.1 version
This commit is contained in:
@@ -76,6 +76,37 @@ __API__ k_err_t tos_event_create(k_event_t *event, k_event_flag_t init_flag);
|
||||
*/
|
||||
__API__ k_err_t tos_event_destroy(k_event_t *event);
|
||||
|
||||
#if TOS_CFG_OBJ_DYNAMIC_CREATE_EN > 0u
|
||||
|
||||
/**
|
||||
* @brief Create an dynamic event.
|
||||
* create an event.
|
||||
*
|
||||
* @attention None
|
||||
*
|
||||
* @param[in] event pointer to the handler of the event pointer.
|
||||
* @param[in] init_flag initial flag of the event.
|
||||
*
|
||||
* @return errcode
|
||||
* @retval #K_ERR_NONE return successfully.
|
||||
*/
|
||||
__API__ k_err_t tos_event_create_dyn(k_event_t **event, k_event_flag_t init_flag);
|
||||
|
||||
/**
|
||||
* @brief Destroy an dynamic event.
|
||||
* destroy an event.
|
||||
*
|
||||
* @attention None
|
||||
*
|
||||
* @param[in] event pointer to the handler of the event.
|
||||
*
|
||||
* @return errcode
|
||||
* @retval #K_ERR_NONE return successfully.
|
||||
*/
|
||||
__API__ k_err_t tos_event_destroy_dyn(k_event_t *event);
|
||||
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Pend an event.
|
||||
* pend an event.
|
||||
|
@@ -44,7 +44,7 @@ extern k_stack_t k_idle_task_stk[];
|
||||
extern k_stack_t *const k_idle_task_stk_addr;
|
||||
extern size_t const k_idle_task_stk_size;
|
||||
|
||||
#if TOS_CFG_TASK_DYNAMIC_CREATE_EN > 0u
|
||||
#if TOS_CFG_OBJ_DYNAMIC_CREATE_EN > 0u
|
||||
/* list to hold all the destroyed dynamic created tasks */
|
||||
extern k_list_t k_dead_task_list;
|
||||
#endif
|
||||
|
@@ -111,7 +111,6 @@ typedef enum k_err_en {
|
||||
K_ERR_TASK_SUSPEND_IDLE,
|
||||
K_ERR_TASK_STK_OVERFLOW,
|
||||
K_ERR_TASK_STK_SIZE_INVALID,
|
||||
K_ERR_TASK_OUT_OF_MEMORY,
|
||||
|
||||
K_ERR_TICKLESS_WKUP_ALARM_NOT_INSTALLED = 2000u,
|
||||
K_ERR_TICKLESS_WKUP_ALARM_NO_INIT,
|
||||
@@ -126,10 +125,6 @@ typedef enum k_err_en {
|
||||
K_ERR_TIMER_INVALID_OPT,
|
||||
K_ERR_TIMER_STOPPED,
|
||||
K_ERR_TIMER_RUNNING,
|
||||
|
||||
K_ERR_SEM_OUT_OF_MEMORY = 2200u,
|
||||
|
||||
K_ERR_MUTEX_OUT_OF_MEMORY = 2300u,
|
||||
} k_err_t;
|
||||
|
||||
#endif /* _TOS_ERR_H_ */
|
||||
|
@@ -45,6 +45,21 @@ typedef struct k_mutex_st {
|
||||
*/
|
||||
__API__ k_err_t tos_mutex_create(k_mutex_t *mutex);
|
||||
|
||||
/**
|
||||
* @brief Destroy a mutex.
|
||||
* destroy a mutex.
|
||||
*
|
||||
* @attention None
|
||||
*
|
||||
* @param[in] mutex pointer to the handler of the mutex.
|
||||
*
|
||||
* @return errcode
|
||||
* @retval #K_ERR_NONE return successfully.
|
||||
*/
|
||||
__API__ k_err_t tos_mutex_destroy(k_mutex_t *mutex);
|
||||
|
||||
#if TOS_CFG_OBJ_DYNAMIC_CREATE_EN > 0u
|
||||
|
||||
/**
|
||||
* @brief Create a dynamic mutex.
|
||||
* create a dynamic mutex.
|
||||
@@ -59,8 +74,8 @@ __API__ k_err_t tos_mutex_create(k_mutex_t *mutex);
|
||||
__API__ k_err_t tos_mutex_create_dyn(k_mutex_t **mutex);
|
||||
|
||||
/**
|
||||
* @brief Destroy a mutex.
|
||||
* destroy a mutex.
|
||||
* @brief Destroy a dynamic mutex.
|
||||
* destroy a dynamic mutex.
|
||||
*
|
||||
* @attention None
|
||||
*
|
||||
@@ -69,7 +84,9 @@ __API__ k_err_t tos_mutex_create_dyn(k_mutex_t **mutex);
|
||||
* @return errcode
|
||||
* @retval #K_ERR_NONE return successfully.
|
||||
*/
|
||||
__API__ k_err_t tos_mutex_destroy(k_mutex_t *mutex);
|
||||
__API__ k_err_t tos_mutex_destroy_dyn(k_mutex_t *mutex);
|
||||
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Pend a mutex.
|
||||
|
@@ -59,6 +59,21 @@ __API__ k_err_t tos_sem_create_max(k_sem_t *sem, k_sem_cnt_t init_count, k_sem_c
|
||||
*/
|
||||
__API__ k_err_t tos_sem_create(k_sem_t *sem, k_sem_cnt_t init_count);
|
||||
|
||||
/**
|
||||
* @brief Destroy a semaphore.
|
||||
* destroy a semaphore.
|
||||
*
|
||||
* @attention None
|
||||
*
|
||||
* @param[in] semaphore pointer to the handler of the semaphore.
|
||||
*
|
||||
* @return errcode
|
||||
* @retval #K_ERR_NONE return successfully.
|
||||
*/
|
||||
__API__ k_err_t tos_sem_destroy(k_sem_t *sem);
|
||||
|
||||
#if TOS_CFG_OBJ_DYNAMIC_CREATE_EN > 0u
|
||||
|
||||
/**
|
||||
* @brief Create a dynamic semaphore with a limitation of maximum count.
|
||||
* create a dynamic semaphore with a limitation of maximum count.
|
||||
@@ -89,8 +104,8 @@ __API__ k_err_t tos_sem_create_max_dyn(k_sem_t **sem, k_sem_cnt_t init_count, k_
|
||||
__API__ k_err_t tos_sem_create_dyn(k_sem_t **sem, k_sem_cnt_t init_count);
|
||||
|
||||
/**
|
||||
* @brief Destroy a semaphore.
|
||||
* destroy a semaphore.
|
||||
* @brief Destroy a dynamic semaphore.
|
||||
* destroy a dynamic semaphore.
|
||||
*
|
||||
* @attention None
|
||||
*
|
||||
@@ -99,7 +114,9 @@ __API__ k_err_t tos_sem_create_dyn(k_sem_t **sem, k_sem_cnt_t init_count);
|
||||
* @return errcode
|
||||
* @retval #K_ERR_NONE return successfully.
|
||||
*/
|
||||
__API__ k_err_t tos_sem_destroy(k_sem_t *sem);
|
||||
__API__ k_err_t tos_sem_destroy_dyn(k_sem_t *sem);
|
||||
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Pend a semaphore.
|
||||
|
@@ -86,7 +86,7 @@ struct k_task_st {
|
||||
k_stack_t *stk_base; /**< task stack base address */
|
||||
size_t stk_size; /**< stack size of the task */
|
||||
|
||||
#if TOS_CFG_TASK_DYNAMIC_CREATE_EN > 0u
|
||||
#if TOS_CFG_OBJ_DYNAMIC_CREATE_EN > 0u
|
||||
k_list_t dead_list; /**< when a dynamic allocated task destroyed, we hook the task's dead_list to the k_dead_task_list */
|
||||
#endif
|
||||
|
||||
@@ -176,7 +176,7 @@ __API__ k_err_t tos_task_create(k_task_t *task,
|
||||
*/
|
||||
__API__ k_err_t tos_task_destroy(k_task_t *task);
|
||||
|
||||
#if TOS_CFG_TASK_DYNAMIC_CREATE_EN > 0u
|
||||
#if TOS_CFG_OBJ_DYNAMIC_CREATE_EN > 0u
|
||||
|
||||
/**
|
||||
* @brief Create a task with a dynamic allocated task handler and stack.
|
||||
|
@@ -102,6 +102,45 @@ __API__ k_err_t tos_timer_create(k_timer_t *tmr, k_tick_t delay, k_tick_t period
|
||||
*/
|
||||
__API__ k_err_t tos_timer_destroy(k_timer_t *tmr);
|
||||
|
||||
#if TOS_CFG_OBJ_DYNAMIC_CREATE_EN > 0u
|
||||
|
||||
/**
|
||||
* @brief Create a dynamic timer.
|
||||
* Create a timer.
|
||||
*
|
||||
* @attention I dont't think a timer need a name. If you do, help yourself.
|
||||
*
|
||||
* @param[in] tmr pointer to the handler of the timer pointer.
|
||||
* @param[in] delay time interval for a timer to run.
|
||||
* @param[in] period period for a timer to restart to run.
|
||||
* @param[in] callback callback function called when the timer expires.
|
||||
* @param[in] cb_arg argument for the callback.
|
||||
* @param[in] opt option for the function call.
|
||||
*
|
||||
* @return errcode
|
||||
* @retval #K_ERR_TIMER_INVALID_PERIOD period is invalid.
|
||||
* @retval #K_ERR_TIMER_INVALID_DELAY delay is invalid.
|
||||
* @retval #K_ERR_NONE return successfully.
|
||||
*/
|
||||
__API__ k_err_t tos_timer_create_dyn(k_timer_t **tmr, k_tick_t delay, k_tick_t period,
|
||||
k_timer_callback_t callback, void *cb_arg, k_opt_t opt);
|
||||
|
||||
/**
|
||||
* @brief Delete a dynamic timer.
|
||||
* Delete the timer.
|
||||
*
|
||||
* @attention None
|
||||
*
|
||||
* @param[in] tmr pointer to the handler of the timer.
|
||||
*
|
||||
* @return errcode
|
||||
* @retval #K_ERR_TIMER_INACTIVE the timer is not active yet.
|
||||
* @retval #K_ERR_NONE return successfully.
|
||||
*/
|
||||
__API__ k_err_t tos_timer_destroy_dyn(k_timer_t *tmr);
|
||||
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Start a timer.
|
||||
* Start the timer to run.
|
||||
|
@@ -25,8 +25,8 @@
|
||||
|
||||
#define TOS_VERSION_MAJOR 0x02
|
||||
#define TOS_VERSION_MINOR 0x05
|
||||
#define TOS_VERSION_PATCH 0x00
|
||||
#define TOS_VERSION "2.5.0"
|
||||
#define TOS_VERSION_PATCH 0x01
|
||||
#define TOS_VERSION "2.5.1"
|
||||
|
||||
#endif /* _TOS_VERSION_H_ */
|
||||
|
||||
|
Reference in New Issue
Block a user