AlexanderVasiljev commented on a change in pull request #2036:
URL: https://github.com/apache/incubator-nuttx/pull/2036#discussion_r508397416



##########
File path: drivers/serial/serial.c
##########
@@ -1761,7 +1771,7 @@ void uart_connected(FAR uart_dev_t *dev, bool connected)
 void uart_reset_sem(FAR uart_dev_t *dev)
 {
   nxsem_reset(&dev->xmitsem,  0);
-  nxsem_reset(&dev->recvsem,  0);
+  nxsem_reset(&dev->recvsem,  1);

Review comment:
       What else cancellation point can be? Ioctl?
   
   The close shuts down the low level driver. There will be no any new event 
from it. As for now, the read function dead locks without new events.
   
   Another approach is to ask low level driver to generate the receive event on 
shut down. But we have many drivers which don't do it.
   




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to