raiden00pl commented on code in PR #20028:
URL: https://github.com/apache/nuttx/pull/20028#discussion_r3903799151


##########
arch/sim/src/sim/sim_uart.c:
##########
@@ -622,7 +622,12 @@ static void tty_dmareceive(struct uart_dev_s *dev)
     {
       xfer->nbytes = ret;
 
-      if (ret == xfer->length && xfer->nlength > 0)
+      /* The console fd is blocking, so only continue into the wrapped

Review Comment:
   `uart_nputs()` won't work well with it. Simulated uarts never execute this 
path, sim console fd is always forced to host fd=0. 
   
   Another thing is that we will change default host fd 0 setting (we have to 
call ` fcntl(0, F_SETFL, O_NONBLOCK)` ) which we should recover after nuttx 
simulator is closed or crash.
   
   This fix is ​​a one-line fix, changing it to NONBLOCK is a rebuild of how 
the sim console works.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to