summaryrefslogtreecommitdiff
path: root/components/drivers
diff options
context:
space:
mode:
authorGrissiom <[email protected]>2013-08-19 15:57:59 +0800
committerGrissiom <[email protected]>2013-08-19 15:57:59 +0800
commite8cca2315a790d61c743a71e1a682e6ace7866fd (patch)
tree96ac8f7b62b94d1105660b5b4964d96162483d26 /components/drivers
parentd683d32bd5502c15be600145966400a41710a7f4 (diff)
dev/pipe: call rx_indicate the time we resume reader
Some reader(FinSh again) would like to block on a semaphore which is released in rx_indicate. So we should invoke rx_indicate in _rt_pipe_resume_reader.
Diffstat (limited to 'components/drivers')
-rw-r--r--components/drivers/src/pipe.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/components/drivers/src/pipe.c b/components/drivers/src/pipe.c
index f01244ce22..f0368e87db 100644
--- a/components/drivers/src/pipe.c
+++ b/components/drivers/src/pipe.c
@@ -104,6 +104,10 @@ static rt_size_t rt_pipe_read(rt_device_t dev,
static void _rt_pipe_resume_reader(struct rt_pipe_device *pipe)
{
+ if (pipe->parent.rx_indicate)
+ pipe->parent.rx_indicate(&pipe->parent,
+ rt_ringbuffer_data_len(&pipe->ringbuffer));
+
if (!rt_list_isempty(&pipe->suspended_read_list))
{
rt_thread_t thread;