casaroli commented on code in PR #20591:
URL: https://github.com/apache/nuttx/pull/20591#discussion_r4256430367


##########
drivers/serial/uart_pl011.c:
##########
@@ -743,17 +743,24 @@ static void pl011_txint(FAR struct uart_dev_s *dev, bool 
enable)
   FAR struct pl011_uart_port_s *sport = dev->priv;
   irqstate_t flags;
 
-  flags = spin_lock_irqsave(&sport->lock);

Review Comment:
   In this driver sport->lock is a spinlock_t (uart_pl011.c:231, also on 
master), and spin_lock_irqsave() on a spinlock_t is not recursive. Should I 
change it to an rspinlock_t and keep it held across uart_xmitchars(), as you 
suggest? That would replace the enter_critical_section() here.



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