add support for dynaminc sem and dynamic mutex
This commit is contained in:
@@ -61,6 +61,35 @@ __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 Create a dynamic semaphore with a limitation of maximum count.
|
||||
* create a dynamic semaphore with a limitation of maximum count.
|
||||
*
|
||||
* @attention None
|
||||
*
|
||||
* @param[in] sem pointer to the pointer 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_dyn(k_sem_t **sem, k_sem_cnt_t init_count, k_sem_cnt_t max_count);
|
||||
|
||||
/**
|
||||
* @brief Create a dynamic semaphore.
|
||||
* create a dynamic semaphore.
|
||||
*
|
||||
* @attention None
|
||||
*
|
||||
* @param[in] sem pointer to the pointer of the semaphore.
|
||||
* @param[in] init_count initial count of the semaphore.
|
||||
*
|
||||
* @return errcode
|
||||
* @retval #K_ERR_NONE return successfully.
|
||||
*/
|
||||
__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.
|
||||
|
Reference in New Issue
Block a user