[add] semaphore reset support for rt-thread

add  semaphore reset support for rt-thread
This commit is contained in:
tyustli 2022-12-19 17:18:47 +08:00 committed by GitHub
parent 159aa599be
commit 7d76c172db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -63,7 +63,8 @@ TU_ATTR_ALWAYS_INLINE static inline bool osal_semaphore_wait(osal_semaphore_t se
}
TU_ATTR_ALWAYS_INLINE static inline void osal_semaphore_reset(osal_semaphore_t const sem_hdl) {
// TODO: implement
rt_ubase_t value = 0;
rt_sem_control(sem_hdl, RT_IPC_CMD_RESET, &value);
}
//--------------------------------------------------------------------+