summaryrefslogtreecommitdiff
path: root/src/osal
diff options
context:
space:
mode:
authorhathach <[email protected]>2020-05-20 15:09:46 +0700
committerhathach <[email protected]>2020-05-20 15:09:46 +0700
commita0fe3a80e74fceee6c97fcf734822280d1cfd62e (patch)
treea880c5b137ef42e6cd442b446cb950070bd92984 /src/osal
parentd8a15aca777abb0094935440f7cd551b36d62f43 (diff)
remove queue lock/unlock per review
Diffstat (limited to 'src/osal')
-rw-r--r--src/osal/osal_none.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/osal/osal_none.h b/src/osal/osal_none.h
index 3bbf15119..0ac5e8aac 100644
--- a/src/osal/osal_none.h
+++ b/src/osal/osal_none.h
@@ -204,11 +204,9 @@ static inline bool osal_queue_send(osal_queue_t qhdl, void const * data, bool in
static inline bool osal_queue_empty(osal_queue_t qhdl)
{
- _osal_q_lock(qhdl);
- bool is_empty = tu_fifo_empty(&qhdl->ff);
- _osal_q_unlock(qhdl);
-
- return is_empty;
+ // Skip queue lock/unlock since this function is primarily called
+ // with interrupt disabled before going into low power mode
+ return tu_fifo_empty(&qhdl->ff);
}
#ifdef __cplusplus