diff options
| author | hathach <[email protected]> | 2019-03-21 00:36:52 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2019-03-21 00:36:52 +0700 |
| commit | a1a6220ac88adfbcac12f11eb2b2c6826ac8c32b (patch) | |
| tree | 1faf067f7b6ad4f9a4d652ab2e794db664d8c9fe /src/osal/osal_none.h | |
| parent | 87962a222d695dcd59beca54e9672f1a44fe574e (diff) | |
update osal for mynewt
Diffstat (limited to 'src/osal/osal_none.h')
| -rw-r--r-- | src/osal/osal_none.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/osal/osal_none.h b/src/osal/osal_none.h index b7989b044..b389a0956 100644 --- a/src/osal/osal_none.h +++ b/src/osal/osal_none.h @@ -65,11 +65,6 @@ static inline bool osal_semaphore_post(osal_semaphore_t sem_hdl, bool in_isr) return true;
}
-static inline void osal_semaphore_reset(osal_semaphore_t sem_hdl)
-{
- sem_hdl->count = 0;
-}
-
// TODO blocking for now
static inline bool osal_semaphore_wait (osal_semaphore_t sem_hdl, uint32_t msec)
{
@@ -81,6 +76,11 @@ static inline bool osal_semaphore_wait (osal_semaphore_t sem_hdl, uint32_t msec) return true;
}
+static inline void osal_semaphore_reset(osal_semaphore_t sem_hdl)
+{
+ sem_hdl->count = 0;
+}
+
//--------------------------------------------------------------------+
// MUTEX API
// Within tinyusb, mutex is never used in ISR context
@@ -94,8 +94,8 @@ static inline osal_mutex_t osal_mutex_create(osal_mutex_def_t* mdef) return mdef;
}
-#define osal_mutex_unlock(_mutex_hdl) osal_semaphore_post(_mutex_hdl, false)
#define osal_mutex_lock osal_semaphore_wait
+#define osal_mutex_unlock(_mutex_hdl) osal_semaphore_post(_mutex_hdl, false)
//--------------------------------------------------------------------+
// QUEUE API
|
