summaryrefslogtreecommitdiff
path: root/components/drivers
diff options
context:
space:
mode:
authorarmink <[email protected]>2016-11-02 08:17:24 +0800
committerarmink <[email protected]>2016-11-02 08:17:24 +0800
commitc414bdaac82888fe6afbd4987fd7a1d0696b9b72 (patch)
tree247116e34fc84bc9de340bef23f97b66789a9cad /components/drivers
parent6fe47a9537e222d6047592c9f113657687e6ce69 (diff)
[DeviceDrivers]Modify the dataqueue comments.
Diffstat (limited to 'components/drivers')
-rw-r--r--components/drivers/src/dataqueue.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/components/drivers/src/dataqueue.c b/components/drivers/src/dataqueue.c
index fc4ce1ef1e..a10b0805b4 100644
--- a/components/drivers/src/dataqueue.c
+++ b/components/drivers/src/dataqueue.c
@@ -122,10 +122,9 @@ rt_err_t rt_data_queue_push(struct rt_data_queue *queue,
queue->queue[queue->put_index % queue->size].data_size = data_size;
queue->put_index += 1;
+ /* there is at least one thread in suspended list */
if (!rt_list_isempty(&(queue->suspended_pop_list)))
{
- /* there is at least one thread in suspended list */
-
/* get thread entry */
thread = rt_list_entry(queue->suspended_pop_list.next,
struct rt_thread,
@@ -217,10 +216,7 @@ rt_err_t rt_data_queue_pop(struct rt_data_queue *queue,
if ((queue->put_index - queue->get_index) <= queue->lwm)
{
- /*
- * there is at least one thread in suspended list
- * and less than low water mark
- */
+ /* there is at least one thread in suspended list */
if (!rt_list_isempty(&(queue->suspended_push_list)))
{
/* get thread entry */