summaryrefslogtreecommitdiff
path: root/components/drivers/src
diff options
context:
space:
mode:
authorarmink <[email protected]>2016-10-19 10:49:42 +0800
committerarmink <[email protected]>2016-10-19 10:49:42 +0800
commitf2c31eebb5306046c44227b72178e5b9490af7c4 (patch)
treebf74095ab680fa4ddd8476def8b1aa860a2fd6fa /components/drivers/src
parent270285217d31fc359cd5600ed0956b69b3b46cee (diff)
[DeviceDrivers]Fix dataqueue's bug when push data is timeout the lwm flag isn't reset.
Diffstat (limited to 'components/drivers/src')
-rw-r--r--components/drivers/src/dataqueue.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/components/drivers/src/dataqueue.c b/components/drivers/src/dataqueue.c
index 1702d20710..f3247f6d30 100644
--- a/components/drivers/src/dataqueue.c
+++ b/components/drivers/src/dataqueue.c
@@ -119,7 +119,11 @@ rt_err_t rt_data_queue_push(struct rt_data_queue *queue,
/* thread is waked up */
result = thread->error;
level = rt_hw_interrupt_disable();
- if (result != RT_EOK) goto __exit;
+ if (result != RT_EOK)
+ {
+ queue->waiting_lwm = RT_FALSE;
+ goto __exit;
+ }
}
queue->queue[queue->put_index & mask].data_ptr = data_ptr;