mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-02-01 03:20:26 +08:00
[DeviceDrivers]Fix dataqueue irq not resume bug.
This commit is contained in:
parent
7860ea4f83
commit
bda6543305
@ -117,11 +117,7 @@ rt_err_t rt_data_queue_push(struct rt_data_queue *queue,
|
|||||||
/* thread is waked up */
|
/* thread is waked up */
|
||||||
result = thread->error;
|
result = thread->error;
|
||||||
level = rt_hw_interrupt_disable();
|
level = rt_hw_interrupt_disable();
|
||||||
if (result != RT_EOK)
|
if (result != RT_EOK) goto __exit;
|
||||||
{
|
|
||||||
queue->waiting_lwm = RT_FALSE;
|
|
||||||
goto __exit;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
queue->queue[queue->put_index % queue->size].data_ptr = data_ptr;
|
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 */
|
/* perform a schedule */
|
||||||
rt_schedule();
|
rt_schedule();
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
rt_hw_interrupt_enable(level);
|
||||||
|
}
|
||||||
|
|
||||||
if (queue->evt_notify != RT_NULL)
|
if (queue->evt_notify != RT_NULL)
|
||||||
queue->evt_notify(queue, RT_DATAQUEUE_EVENT_LWM);
|
queue->evt_notify(queue, RT_DATAQUEUE_EVENT_LWM);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user