arch: cxd56xx: Fix critical section in serial transmission

Fix an issue that the serial transmission buffers are corrupted because
serial transmission are not protected by critical section in non-smp mode.
This commit is contained in:
SPRESENSE 2022-03-16 15:32:36 +09:00 committed by Masayuki Ishikawa
parent bbf12f3b1b
commit c05ace557f

View File

@ -1001,9 +1001,13 @@ static void up_txint(FAR struct uart_dev_s *dev, bool enable)
* interrupts disabled (note this may recurse).
*/
# ifdef CONFIG_SMP
spin_unlock_irqrestore(&priv->lock, flags);
# endif
uart_xmitchars(dev);
# ifdef CONFIG_SMP
flags = spin_lock_irqsave(&priv->lock);
# endif
#endif
}
else