summaryrefslogtreecommitdiff
path: root/components/drivers/src/dataqueue.c
diff options
context:
space:
mode:
Diffstat (limited to 'components/drivers/src/dataqueue.c')
-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;