You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/12/19 17:26:49 UTC

[GitHub] [incubator-nuttx] Ouss4 commented on a change in pull request #5017: libc: Enable terminal api regardless of CONFIG_SERIAL_TERMIOS setting

Ouss4 commented on a change in pull request #5017:
URL: https://github.com/apache/incubator-nuttx/pull/5017#discussion_r771978425



##########
File path: drivers/serial/serial.c
##########
@@ -1332,12 +1333,28 @@ static int uart_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
             }
             break;
 
-#ifdef CONFIG_SERIAL_TERMIOS
           case TCFLSH:
             {
               /* Empty the tx/rx buffers */
 
-              irqstate_t flags = enter_critical_section();
+              irqstate_t flags;
+
+              /* tcdrain is a cancellation point */
+
+              if (enter_cancellation_point())

Review comment:
       Why was the cancellation point check moved into the switch statement inside the ioctl?  We usually have it in the API itself (as it was), which make it easy to read and identify.




-- 
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: commits-unsubscribe@nuttx.apache.org

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