diff options
| author | tyustli <[email protected]> | 2022-12-19 17:18:47 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-12-19 17:18:47 +0800 |
| commit | 7d76c172db2f45846c9db45ceed4d879be96296d (patch) | |
| tree | 902b9df4dba107dcdffb65d4deb3e0755b80952f /src/osal | |
| parent | 159aa599be42534cd9a37ae03c71c228c3e72e90 (diff) | |
[add] semaphore reset support for rt-thread
add semaphore reset support for rt-thread
Diffstat (limited to 'src/osal')
| -rw-r--r-- | src/osal/osal_rtthread.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/osal/osal_rtthread.h b/src/osal/osal_rtthread.h index f8452bfb2..c0d6e91a1 100644 --- a/src/osal/osal_rtthread.h +++ b/src/osal/osal_rtthread.h @@ -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); } //--------------------------------------------------------------------+ |
