You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ac...@apache.org on 2020/01/10 22:25:17 UTC

[incubator-nuttx] 01/02: drivers: serial: Fix a wrong variable in serial.c in SMP mode.

This is an automated email from the ASF dual-hosted git repository.

acassis pushed a commit to branch pr74
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit b88647417d3b630ba87071cf66d0c2745c6fae23
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;