Skip to content

Commit 7d76c17

Browse files
authored
[add] semaphore reset support for rt-thread
add semaphore reset support for rt-thread
1 parent 159aa59 commit 7d76c17

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/osal/osal_rtthread.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ TU_ATTR_ALWAYS_INLINE static inline bool osal_semaphore_wait(osal_semaphore_t se
6363
}
6464

6565
TU_ATTR_ALWAYS_INLINE static inline void osal_semaphore_reset(osal_semaphore_t const sem_hdl) {
66-
// TODO: implement
66+
rt_ubase_t value = 0;
67+
rt_sem_control(sem_hdl, RT_IPC_CMD_RESET, &value);
6768
}
6869

6970
//--------------------------------------------------------------------+

0 commit comments

Comments
 (0)