This commit is contained in:
hathach
2019-04-02 16:18:36 +07:00
parent 2c1072c0ab
commit 6564580c3d
4 changed files with 39 additions and 29 deletions

View File

@@ -95,8 +95,15 @@ static inline osal_mutex_t osal_mutex_create(osal_mutex_def_t* mdef)
return mdef;
}
#define osal_mutex_lock osal_semaphore_wait
#define osal_mutex_unlock(_mutex_hdl) osal_semaphore_post(_mutex_hdl, false)
static inline bool osal_mutex_lock (osal_mutex_t mutex_hdl, uint32_t msec)
{
return osal_semaphore_wait(mutex_hdl, msec);
}
static inline bool osal_mutex_unlock(osal_mutex_t mutex_hdl)
{
return osal_semaphore_post(mutex_hdl, false);
}
//--------------------------------------------------------------------+
// QUEUE API