summaryrefslogtreecommitdiff
path: root/src/osal
diff options
context:
space:
mode:
authorhathach <[email protected]>2020-05-20 14:38:34 +0700
committerhathach <[email protected]>2020-05-20 14:38:34 +0700
commitd8a15aca777abb0094935440f7cd551b36d62f43 (patch)
treeda61198d571756113eb47a0e9e3a047cb1e61a5e /src/osal
parent88a455a9b99099bf27ce239006ecfd2da3894bcf (diff)
remove osal_queue_t const qhdl from osal API
since it doesn't make any differences.
Diffstat (limited to 'src/osal')
-rw-r--r--src/osal/osal.h6
-rw-r--r--src/osal/osal_freertos.h6
-rw-r--r--src/osal/osal_mynewt.h6
-rw-r--r--src/osal/osal_none.h6
4 files changed, 12 insertions, 12 deletions
diff --git a/src/osal/osal.h b/src/osal/osal.h
index 3729ad94d..2e7a3539f 100644
--- a/src/osal/osal.h
+++ b/src/osal/osal.h
@@ -78,9 +78,9 @@ static inline bool osal_mutex_unlock(osal_mutex_t mutex_hdl);
//------------- Queue -------------//
static inline osal_queue_t osal_queue_create(osal_queue_def_t* qdef);
-static inline bool osal_queue_receive(osal_queue_t const qhdl, void* data);
-static inline bool osal_queue_send(osal_queue_t const qhdl, void const * data, bool in_isr);
-static inline bool osal_queue_empty(osal_queue_t const qhdl);
+static inline bool osal_queue_receive(osal_queue_t qhdl, void* data);
+static inline bool osal_queue_send(osal_queue_t qhdl, void const * data, bool in_isr);
+static inline bool osal_queue_empty(osal_queue_t qhdl);
#if 0 // TODO remove subtask related macros later
// Sub Task
diff --git a/src/osal/osal_freertos.h b/src/osal/osal_freertos.h
index 839c1924f..d2d5f51c9 100644
--- a/src/osal/osal_freertos.h
+++ b/src/osal/osal_freertos.h
@@ -118,17 +118,17 @@ static inline osal_queue_t osal_queue_create(osal_queue_def_t* qdef)
return xQueueCreateStatic(qdef->depth, qdef->item_sz, (uint8_t*) qdef->buf, &qdef->sq);
}
-static inline bool osal_queue_receive(osal_queue_t const qhdl, void* data)
+static inline bool osal_queue_receive(osal_queue_t qhdl, void* data)
{
return xQueueReceive(qhdl, data, portMAX_DELAY);
}
-static inline bool osal_queue_send(osal_queue_t const qhdl, void const * data, bool in_isr)
+static inline bool osal_queue_send(osal_queue_t qhdl, void const * data, bool in_isr)
{
return in_isr ? xQueueSendToBackFromISR(qhdl, data, NULL) : xQueueSendToBack(qhdl, data, OSAL_TIMEOUT_WAIT_FOREVER);
}
-static inline bool osal_queue_empty(osal_queue_t const qhdl)
+static inline bool osal_queue_empty(osal_queue_t qhdl)
{
return uxQueueMessagesWaiting(qhdl) > 0;
}
diff --git a/src/osal/osal_mynewt.h b/src/osal/osal_mynewt.h
index f7c871c4b..6882329c1 100644
--- a/src/osal/osal_mynewt.h
+++ b/src/osal/osal_mynewt.h
@@ -125,7 +125,7 @@ static inline osal_queue_t osal_queue_create(osal_queue_def_t* qdef)
return (osal_queue_t) qdef;
}
-static inline bool osal_queue_receive(osal_queue_t const qhdl, void* data)
+static inline bool osal_queue_receive(osal_queue_t qhdl, void* data)
{
struct os_event* ev;
ev = os_eventq_get(&qhdl->evq);
@@ -137,7 +137,7 @@ static inline bool osal_queue_receive(osal_queue_t const qhdl, void* data)
return true;
}
-static inline bool osal_queue_send(osal_queue_t const qhdl, void const * data, bool in_isr)
+static inline bool osal_queue_send(osal_queue_t qhdl, void const * data, bool in_isr)
{
(void) in_isr;
@@ -161,7 +161,7 @@ static inline bool osal_queue_send(osal_queue_t const qhdl, void const * data, b
return true;
}
-static inline bool osal_queue_empty(osal_queue_t const qhdl)
+static inline bool osal_queue_empty(osal_queue_t qhdl)
{
return STAILQ_EMPTY(&qhdl->evq.evq_list);
}
diff --git a/src/osal/osal_none.h b/src/osal/osal_none.h
index c9b762915..3bbf15119 100644
--- a/src/osal/osal_none.h
+++ b/src/osal/osal_none.h
@@ -176,7 +176,7 @@ static inline osal_queue_t osal_queue_create(osal_queue_def_t* qdef)
return (osal_queue_t) qdef;
}
-static inline bool osal_queue_receive(osal_queue_t const qhdl, void* data)
+static inline bool osal_queue_receive(osal_queue_t qhdl, void* data)
{
_osal_q_lock(qhdl);
bool success = tu_fifo_read(&qhdl->ff, data);
@@ -185,7 +185,7 @@ static inline bool osal_queue_receive(osal_queue_t const qhdl, void* data)
return success;
}
-static inline bool osal_queue_send(osal_queue_t const qhdl, void const * data, bool in_isr)
+static inline bool osal_queue_send(osal_queue_t qhdl, void const * data, bool in_isr)
{
if (!in_isr) {
_osal_q_lock(qhdl);
@@ -202,7 +202,7 @@ static inline bool osal_queue_send(osal_queue_t const qhdl, void const * data, b
return success;
}
-static inline bool osal_queue_empty(osal_queue_t const qhdl)
+static inline bool osal_queue_empty(osal_queue_t qhdl)
{
_osal_q_lock(qhdl);
bool is_empty = tu_fifo_empty(&qhdl->ff);