add API (tos_task_create_dyn & tos_task_walkthru & tos_task_curr_task_get)
tos_task_create_dyn: create task with dynamic allocated task handler and stack tos_task_walkthru: API to walk through the statistic list of all the existing task tos_task_curr_task_get: get current running task handler
This commit is contained in:
@@ -23,8 +23,24 @@
|
||||
typedef struct k_sem_st {
|
||||
pend_obj_t pend_obj;
|
||||
k_sem_cnt_t count;
|
||||
k_sem_cnt_t count_max;
|
||||
} k_sem_t;
|
||||
|
||||
/**
|
||||
* @brief Create a semaphore with a limitation of maximum count.
|
||||
* create a semaphore with a limitation of maximum count.
|
||||
*
|
||||
* @attention None
|
||||
*
|
||||
* @param[in] sem pointer to the handler of the semaphore.
|
||||
* @param[in] init_count initial count of the semaphore.
|
||||
* @param[in] max_count maximum count of the semaphore.
|
||||
*
|
||||
* @return errcode
|
||||
* @retval #K_ERR_NONE return successfully.
|
||||
*/
|
||||
__API__ k_err_t tos_sem_create_max(k_sem_t *sem, k_sem_cnt_t init_count, k_sem_cnt_t max_count);
|
||||
|
||||
/**
|
||||
* @brief Create a semaphore.
|
||||
* create a semaphore.
|
||||
@@ -32,6 +48,7 @@ typedef struct k_sem_st {
|
||||
* @attention None
|
||||
*
|
||||
* @param[in] sem pointer to the handler of the semaphore.
|
||||
* @param[in] init_count initial count of the semaphore.
|
||||
*
|
||||
* @return errcode
|
||||
* @retval #K_ERR_NONE return successfully.
|
||||
|
Reference in New Issue
Block a user