diff options
| author | armink <[email protected]> | 2016-10-29 14:35:07 +0800 |
|---|---|---|
| committer | armink <[email protected]> | 2016-10-29 14:35:07 +0800 |
| commit | bda654330567a62695ae365b56d31512ba301ad3 (patch) | |
| tree | 29a8cec438b95cb1db5ddddcd4bbf8574a00b532 /components/drivers/src/dataqueue.c | |
| parent | 7860ea4f8348cf42c8690cdb265ed42fa2a2c32c (diff) | |
[DeviceDrivers]Fix dataqueue irq not resume bug.
Diffstat (limited to 'components/drivers/src/dataqueue.c')
| -rw-r--r-- | components/drivers/src/dataqueue.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/components/drivers/src/dataqueue.c b/components/drivers/src/dataqueue.c index c47eeefee9..dc265fb66d 100644 --- a/components/drivers/src/dataqueue.c +++ b/components/drivers/src/dataqueue.c @@ -117,11 +117,7 @@ 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) - { - queue->waiting_lwm = RT_FALSE; - goto __exit; - } + if (result != RT_EOK) goto __exit; } queue->queue[queue->put_index % queue->size].data_ptr = data_ptr; @@ -244,6 +240,10 @@ rt_err_t rt_data_queue_pop(struct rt_data_queue *queue, /* perform a schedule */ rt_schedule(); } + else + { + rt_hw_interrupt_enable(level); + } if (queue->evt_notify != RT_NULL) queue->evt_notify(queue, RT_DATAQUEUE_EVENT_LWM); |
