mirror of
https://github.com/apache/nuttx.git
synced 2026-05-22 22:20:01 +08:00
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:
committed by
Masayuki Ishikawa
parent
bbf12f3b1b
commit
c05ace557f
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user