You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by gn...@apache.org on 2020/01/10 15:39:01 UTC
[incubator-nuttx] branch master updated: drivers: serial: Fix a
wrong variable in serial.c in SMP mode.
This is an automated email from the ASF dual-hosted git repository.
gnutt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 784408e drivers: serial: Fix a wrong variable in serial.c in SMP mode.
784408e is described below
commit 784408e617833afbfaf1f5e2d77177164cab8638
Author: Masayuki Ishikawa <ma...@gmail.com>
AuthorDate: Sat Jan 11 00:10:12 2020 +0900
drivers: serial: Fix a wrong variable in serial.c in SMP mode.
---
drivers/serial/serial.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/serial/serial.c b/drivers/serial/serial.c
index 4957fa4..dd0a0b0 100644
--- a/drivers/serial/serial.c
+++ b/drivers/serial/serial.c
@@ -210,7 +210,7 @@ static int uart_putxmitchar(FAR uart_dev_t *dev, int ch, bool oktoblock)
int ret;
#ifdef CONFIG_SMP
- flags = enter_critical_section();
+ irqstate_t flags2 = enter_critical_section();
#endif
/* Increment to see what the next head pointer will be. We need to use the "next"
@@ -347,7 +347,7 @@ static int uart_putxmitchar(FAR uart_dev_t *dev, int ch, bool oktoblock)
err_out:
#ifdef CONFIG_SMP
- leave_critical_section(flags);
+ leave_critical_section(flags2);
#endif
return ret;