You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2020/10/29 08:15:06 UTC

[incubator-nuttx] branch master updated (96d1f01 -> 51af062)

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

xiaoxiang pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git.


    from 96d1f01  build.yml: Switch avr-mips-riscv-x86-xtensa.dat to other.dat
     new c13f869  Modify SIGSTP to SIGTSTP
     new 51af062  include/nuttx/serial/serial.h: Fix nxstyle errors

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 Documentation/reference/user/07_signals.rst        |  2 +-
 TODO                                               |  2 +-
 .../arm/sama5/giant-board/configs/netnsh/defconfig |  2 +-
 .../giant-board/configs/sdmmc-net-nsh/defconfig    |  2 +-
 .../sama5/giant-board/configs/sdmmcnsh/defconfig   |  2 +-
 .../sama5/sama5d2-xult/configs/netnsh/defconfig    |  2 +-
 .../sama5/sama5d2-xult/configs/sdmmcnsh/defconfig  |  2 +-
 .../ethernet-over-usb-2-high-speed/defconfig       |  2 +-
 boards/sim/sim/sim/configs/tcpblaster/defconfig    |  2 +-
 drivers/net/telnet.c                               | 10 ++++-----
 drivers/serial/Kconfig                             | 24 +++++++++++-----------
 drivers/serial/serial.c                            |  4 ++--
 drivers/serial/serial_dma.c                        | 20 +++++++++---------
 drivers/serial/serial_io.c                         | 12 +++++------
 include/nuttx/serial/serial.h                      | 12 +++++------
 include/signal.h                                   |  2 +-
 libs/libc/string/lib_strsignal.c                   |  6 +++---
 sched/Kconfig                                      |  8 ++++----
 sched/group/group_suspendchildren.c                |  2 +-
 sched/init/nx_start.c                              |  2 +-
 sched/signal/sig_default.c                         |  2 +-
 sched/signal/sig_dispatch.c                        |  2 +-
 22 files changed, 62 insertions(+), 62 deletions(-)


[incubator-nuttx] 01/02: Modify SIGSTP to SIGTSTP

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit c13f86943268ce8b42a268dfda9b870a0e9914ea
Author: Yoshinori Sugino <ys...@gmail.com>
AuthorDate: Thu Oct 29 13:53:41 2020 +0900

    Modify SIGSTP to SIGTSTP
    
    Follow the POSIX description.
    SIGTSTP should be sent when the Ctrl-Z characters is encountered, not SIGSTP.
    
    Testing:
    Built with hifive1-revb:nsh (CONFIG_SERIAL_TERMIOS=y, CONFIG_SIG_DEFAULT=y and CONFIG_TTY_SIGTSTP=y)
---
 Documentation/reference/user/07_signals.rst        |  2 +-
 TODO                                               |  2 +-
 .../arm/sama5/giant-board/configs/netnsh/defconfig |  2 +-
 .../giant-board/configs/sdmmc-net-nsh/defconfig    |  2 +-
 .../sama5/giant-board/configs/sdmmcnsh/defconfig   |  2 +-
 .../sama5/sama5d2-xult/configs/netnsh/defconfig    |  2 +-
 .../sama5/sama5d2-xult/configs/sdmmcnsh/defconfig  |  2 +-
 .../ethernet-over-usb-2-high-speed/defconfig       |  2 +-
 boards/sim/sim/sim/configs/tcpblaster/defconfig    |  2 +-
 drivers/net/telnet.c                               | 10 ++++-----
 drivers/serial/Kconfig                             | 24 +++++++++++-----------
 drivers/serial/serial.c                            |  4 ++--
 drivers/serial/serial_dma.c                        | 20 +++++++++---------
 drivers/serial/serial_io.c                         | 12 +++++------
 include/nuttx/serial/serial.h                      |  2 +-
 include/signal.h                                   |  2 +-
 libs/libc/string/lib_strsignal.c                   |  6 +++---
 sched/Kconfig                                      |  8 ++++----
 sched/group/group_suspendchildren.c                |  2 +-
 sched/init/nx_start.c                              |  2 +-
 sched/signal/sig_default.c                         |  2 +-
 sched/signal/sig_dispatch.c                        |  2 +-
 22 files changed, 57 insertions(+), 57 deletions(-)

diff --git a/Documentation/reference/user/07_signals.rst b/Documentation/reference/user/07_signals.rst
index 7fb8faf..b733813 100644
--- a/Documentation/reference/user/07_signals.rst
+++ b/Documentation/reference/user/07_signals.rst
@@ -27,7 +27,7 @@ SIGUSR2  Abnormal Termination 	CONFIG_SIG_SIGUSR2_ACTION
 SIGALRM  Abnormal Termination 	CONFIG_SIG_SIGALRM_ACTION
 SIGPOLL  Abnormal Termination 	CONFIG_SIG_SIGPOLL_ACTION
 SIGSTOP  Suspend task           CONFIG_SIG_SIGSTOP_ACTION
-SIGSTP   Suspend task           CONFIG_SIG_SIGSTOP_ACTION
+SIGTSTP  Suspend task           CONFIG_SIG_SIGSTOP_ACTION
 SIGCONT  Resume task            CONFIG_SIG_SIGSTOP_ACTION
 SIGINT   Abnormal Termination 	CONFIG_SIG_SIGKILL_ACTION
 SIGKILL  Abnormal Termination 	CONFIG_SIG_SIGKILL_ACTION
diff --git a/TODO b/TODO
index 8f6c551..60c231a 100644
--- a/TODO
+++ b/TODO
@@ -718,7 +718,7 @@ o Signals (sched/signal, arch/)
                SIGALRM Abnormal Termination CONFIG_SIG_SIGALRM_ACTION
                SIGPOLL Abnormal Termination CONFIG_SIG_SIGPOLL_ACTION
                SIGSTOP Suspend task         CONFIG_SIG_SIGSTOP_ACTION
-               SIGSTP  Suspend task         CONFIG_SIG_SIGSTOP_ACTION
+               SIGTSTP Suspend task         CONFIG_SIG_SIGSTOP_ACTION
                SIGCONT Resume task          CONFIG_SIG_SIGSTOP_ACTION
                SIGINT  Abnormal Termination CONFIG_SIG_SIGKILL_ACTION
                SIGKILL Abnormal Termination CONFIG_SIG_SIGKILL_ACTION
diff --git a/boards/arm/sama5/giant-board/configs/netnsh/defconfig b/boards/arm/sama5/giant-board/configs/netnsh/defconfig
index e8e88f3..d97f148 100644
--- a/boards/arm/sama5/giant-board/configs/netnsh/defconfig
+++ b/boards/arm/sama5/giant-board/configs/netnsh/defconfig
@@ -100,7 +100,7 @@ CONFIG_SYSLOG_TIMESTAMP=y
 CONFIG_SYSTEM_NSH=y
 CONFIG_SYSTEM_PING=y
 CONFIG_TTY_SIGINT=y
-CONFIG_TTY_SIGSTP=y
+CONFIG_TTY_SIGTSTP=y
 CONFIG_UART1_SERIAL_CONSOLE=y
 CONFIG_UBOOT_UIMAGE=y
 CONFIG_UIMAGE_ENTRY_POINT=0x20008040
diff --git a/boards/arm/sama5/giant-board/configs/sdmmc-net-nsh/defconfig b/boards/arm/sama5/giant-board/configs/sdmmc-net-nsh/defconfig
index 7dfea4e..cc9fc3f 100644
--- a/boards/arm/sama5/giant-board/configs/sdmmc-net-nsh/defconfig
+++ b/boards/arm/sama5/giant-board/configs/sdmmc-net-nsh/defconfig
@@ -133,7 +133,7 @@ CONFIG_SYSTEM_NSH=y
 CONFIG_SYSTEM_PING=y
 CONFIG_SYSTEM_VI=y
 CONFIG_TTY_SIGINT=y
-CONFIG_TTY_SIGSTP=y
+CONFIG_TTY_SIGTSTP=y
 CONFIG_UART1_SERIAL_CONSOLE=y
 CONFIG_UBOOT_UIMAGE=y
 CONFIG_UIMAGE_ENTRY_POINT=0x20008040
diff --git a/boards/arm/sama5/giant-board/configs/sdmmcnsh/defconfig b/boards/arm/sama5/giant-board/configs/sdmmcnsh/defconfig
index 5e5a24e..3f8e0ec 100644
--- a/boards/arm/sama5/giant-board/configs/sdmmcnsh/defconfig
+++ b/boards/arm/sama5/giant-board/configs/sdmmcnsh/defconfig
@@ -126,7 +126,7 @@ CONFIG_SYSTEM_NSH=y
 CONFIG_SYSTEM_PING=y
 CONFIG_SYSTEM_VI=y
 CONFIG_TTY_SIGINT=y
-CONFIG_TTY_SIGSTP=y
+CONFIG_TTY_SIGTSTP=y
 CONFIG_UART1_SERIAL_CONSOLE=y
 CONFIG_USBDEV=y
 CONFIG_USBDEV_DMA=y
diff --git a/boards/arm/sama5/sama5d2-xult/configs/netnsh/defconfig b/boards/arm/sama5/sama5d2-xult/configs/netnsh/defconfig
index ee45ea1..6d7020e 100644
--- a/boards/arm/sama5/sama5d2-xult/configs/netnsh/defconfig
+++ b/boards/arm/sama5/sama5d2-xult/configs/netnsh/defconfig
@@ -103,7 +103,7 @@ CONFIG_SYSLOG_TIMESTAMP=y
 CONFIG_SYSTEM_NSH=y
 CONFIG_SYSTEM_PING=y
 CONFIG_TTY_SIGINT=y
-CONFIG_TTY_SIGSTP=y
+CONFIG_TTY_SIGTSTP=y
 CONFIG_UART1_SERIAL_CONSOLE=y
 CONFIG_UBOOT_UIMAGE=y
 CONFIG_UIMAGE_ENTRY_POINT=0x20008040
diff --git a/boards/arm/sama5/sama5d2-xult/configs/sdmmcnsh/defconfig b/boards/arm/sama5/sama5d2-xult/configs/sdmmcnsh/defconfig
index 3b94e26..35ea6ab 100644
--- a/boards/arm/sama5/sama5d2-xult/configs/sdmmcnsh/defconfig
+++ b/boards/arm/sama5/sama5d2-xult/configs/sdmmcnsh/defconfig
@@ -130,7 +130,7 @@ CONFIG_SYSTEM_NSH=y
 CONFIG_SYSTEM_PING=y
 CONFIG_SYSTEM_VI=y
 CONFIG_TTY_SIGINT=y
-CONFIG_TTY_SIGSTP=y
+CONFIG_TTY_SIGTSTP=y
 CONFIG_UART1_SERIAL_CONSOLE=y
 CONFIG_USBDEV=y
 CONFIG_USBDEV_DMA=y
diff --git a/boards/arm/sama5/sama5d3-xplained/configs/ethernet-over-usb-2-high-speed/defconfig b/boards/arm/sama5/sama5d3-xplained/configs/ethernet-over-usb-2-high-speed/defconfig
index 96c9351..8b65eb0 100644
--- a/boards/arm/sama5/sama5d3-xplained/configs/ethernet-over-usb-2-high-speed/defconfig
+++ b/boards/arm/sama5/sama5d3-xplained/configs/ethernet-over-usb-2-high-speed/defconfig
@@ -116,7 +116,7 @@ CONFIG_SYSTEM_NSH=y
 CONFIG_SYSTEM_PING=y
 CONFIG_SYSTEM_VI=y
 CONFIG_TTY_SIGINT=y
-CONFIG_TTY_SIGSTP=y
+CONFIG_TTY_SIGTSTP=y
 CONFIG_USBDEV=y
 CONFIG_USBDEV_DMA=y
 CONFIG_USBDEV_DUALSPEED=y
diff --git a/boards/sim/sim/sim/configs/tcpblaster/defconfig b/boards/sim/sim/sim/configs/tcpblaster/defconfig
index 33b63ec..89910ca 100644
--- a/boards/sim/sim/sim/configs/tcpblaster/defconfig
+++ b/boards/sim/sim/sim/configs/tcpblaster/defconfig
@@ -125,6 +125,6 @@ CONFIG_TELNET_CHARACTER_MODE=y
 CONFIG_TELNET_TXBUFFER_SIZE=64
 CONFIG_TTY_SIGINT=y
 CONFIG_TTY_SIGINT_CHAR=0x3
-CONFIG_TTY_SIGSTP=y
+CONFIG_TTY_SIGTSTP=y
 CONFIG_USERMAIN_STACKSIZE=4096
 CONFIG_USER_ENTRYPOINT="nsh_main"
diff --git a/drivers/net/telnet.c b/drivers/net/telnet.c
index 00d3148..fb7cea5 100644
--- a/drivers/net/telnet.c
+++ b/drivers/net/telnet.c
@@ -68,7 +68,7 @@
 #endif
 
 #undef HAVE_SIGNALS
-#if defined(CONFIG_TTY_SIGINT) || defined(CONFIG_TTY_SIGSTP)
+#if defined(CONFIG_TTY_SIGINT) || defined(CONFIG_TTY_SIGTSTP)
 #  define HAVE_SIGNALS
 #endif
 
@@ -289,18 +289,18 @@ static void telnet_check_ctrlchar(FAR struct telnet_dev_s *priv,
         }
 #endif
 
-#ifdef CONFIG_TTY_SIGSTP
-      /* Is this the special character that will generate the SIGSTP
+#ifdef CONFIG_TTY_SIGTSTP
+      /* Is this the special character that will generate the SIGTSTP
        * signal?
        */
 
-      if (*buffer == CONFIG_TTY_SIGSTP_CHAR)
+      if (*buffer == CONFIG_TTY_SIGTSTP_CHAR)
         {
           /* Note that the kill is needed and do not put the character
            * into the Rx buffer.  It should not be read as normal data.
            */
 
-          signo = SIGSTP;
+          signo = SIGTSTP;
 #ifndef CONFIG_TTY_SIGINT
           break;
 #endif
diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig
index de0061a..22e6b14 100644
--- a/drivers/serial/Kconfig
+++ b/drivers/serial/Kconfig
@@ -192,14 +192,14 @@ config TTY_SIGINT
 		  INTR   SIGINT   Ctrl-C  ETX(0x03) Interrupt
 		  KILL   SIGKILL  Ctrl-U  NAK(0x15) Kill
 		  QUIT   SIGQUIT  Ctrl-\  FS (0x1c) Quit
-		  SUSP   SIGSTP   Ctrl-Z  SUB(0x1a) Suspend
-		  DSUSP  SIGSTP   Ctrl-Y  EM (0x19) Delayed suspend
+		  SUSP   SIGTSTP  Ctrl-Z  SUB(0x1a) Suspend
+		  DSUSP  SIGTSTP  Ctrl-Y  EM (0x19) Delayed suspend
 
 		Additional requirements:
 		  - SIGKILL cannot be caught or ignored.  Compared to SIGTERM which
 		    is like SIGKILL but can be caught or ignored.
 		  - SIGQUIT is like SIGINT but causes generation of a core dump
-		  - SIGSTOP cannot be caught or ignored.  SIGSTP is like SIGSTOP but
+		  - SIGSTOP cannot be caught or ignored.  SIGTSTP is like SIGSTOP but
 		    can be caught or ignored.
 		  - The delayed suspend (DSUSD) is like suspend (SUPD), except that
 		    the suspension is delayed until the next read operation
@@ -219,8 +219,8 @@ config TTY_SIGINT_CHAR
 		REVISIT:  Traditionally Ctrl-C would generate SIGINT.  Ctrl-D is the
 		End-of-File character that should close the stream.
 
-config TTY_SIGSTP
-	bool "Support SIGSTP"
+config TTY_SIGTSTP
+	bool "Support SIGTSTP"
 	default n
 	select CONFIG_SIG_SIGSTOP_ACTION
 	depends on SERIAL_TERMIOS
@@ -237,24 +237,24 @@ config TTY_SIGSTP
 		  INTR   SIGINT   Ctrl-C  ETX(0x03) Interrupt
 		  KILL   SIGKILL  Ctrl-U  NAK(0x15) Kill
 		  QUIT   SIGQUIT  Ctrl-\  FS (0x1c) Quit
-		  SUSP   SIGSTP   Ctrl-Z  SUB(0x1a) Suspend
-		  DSUSP  SIGSTP   Ctrl-Y  EM (0x19) Delayed suspend
+		  SUSP   SIGTSTP  Ctrl-Z  SUB(0x1a) Suspend
+		  DSUSP  SIGTSTP  Ctrl-Y  EM (0x19) Delayed suspend
 
 		Additional requirements:
 		  - SIGKILL cannot be caught or ignored.  Compared to SIGTERM which
 		    is like SIGKILL but can be caught or ignored.
 		  - SIGQUIT is like SIGINT but causes generation of a core dump
-		  - SIGSTOP cannot be caught or ignored.  SIGSTP is like SIGSTOP but
+		  - SIGSTOP cannot be caught or ignored.  SIGTSTP is like SIGSTOP but
 		    can be caught or ignored.
 		  - The delayed suspend (DSUSD) is like suspend (SUPD), except that
 		    the suspension is delayed until the next read operation
 
-config TTY_SIGSTP_CHAR
-	hex "Serial parse SIGSTP characters"
+config TTY_SIGTSTP_CHAR
+	hex "Serial parse SIGTSTP characters"
 	default 0x1a
-	depends on TTY_SIGSTP
+	depends on TTY_SIGTSTP
 	---help---
-		Use ASCII 0x1a (Ctrl-z) input to determine whether to send a SIGSTP
+		Use ASCII 0x1a (Ctrl-z) input to determine whether to send a SIGTSTP
 		event.  Other characters may also be selected.
 
 #
diff --git a/drivers/serial/serial.c b/drivers/serial/serial.c
index 80f7d4c..61b0bd2 100644
--- a/drivers/serial/serial.c
+++ b/drivers/serial/serial.c
@@ -1372,7 +1372,7 @@ static int uart_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
             break;
 #endif
 
-#if defined(CONFIG_TTY_SIGINT) || defined(CONFIG_TTY_SIGSTP)
+#if defined(CONFIG_TTY_SIGINT) || defined(CONFIG_TTY_SIGTSTP)
           /* Make the controlling terminal of the calling process */
 
           case TIOCSCTTY:
@@ -1590,7 +1590,7 @@ errout:
 int uart_register(FAR const char *path, FAR uart_dev_t *dev)
 {
 #ifdef CONFIG_SERIAL_TERMIOS
-#  if defined(CONFIG_TTY_SIGINT) || defined(CONFIG_TTY_SIGSTP)
+#  if defined(CONFIG_TTY_SIGINT) || defined(CONFIG_TTY_SIGTSTP)
   /* Initialize  of the task that will receive SIGINT signals. */
 
   dev->pid = (pid_t)-1;
diff --git a/drivers/serial/serial_dma.c b/drivers/serial/serial_dma.c
index 5d9888e..f31dc4e 100644
--- a/drivers/serial/serial_dma.c
+++ b/drivers/serial/serial_dma.c
@@ -55,7 +55,7 @@
  * Name: uart_check_signo
  *
  * Description:
- *   Check if the SIGINT or SIGSTP character is in the contiguous Rx DMA
+ *   Check if the SIGINT or SIGTSTP character is in the contiguous Rx DMA
  *   buffer region.  The first signal associated with the first such
  *   character is returned.
  *
@@ -64,12 +64,12 @@
  *
  * Returned Value:
  *   0 if a signal-related character does not appear in the.  Otherwise,
- *   SIGKILL or SIGSTP may be returned to indicate the appropriate signal
+ *   SIGKILL or SIGTSTP may be returned to indicate the appropriate signal
  *   action.
  *
  ****************************************************************************/
 
-#if defined(CONFIG_TTY_SIGINT) || defined(CONFIG_TTY_SIGSTP)
+#if defined(CONFIG_TTY_SIGINT) || defined(CONFIG_TTY_SIGTSTP)
 static int uart_check_signo(const char *buf, size_t size)
 {
   size_t i;
@@ -83,10 +83,10 @@ static int uart_check_signo(const char *buf, size_t size)
         }
 #endif
 
-#ifdef CONFIG_TTY_SIGSTP
-      if (buf[i] == CONFIG_TTY_SIGSTP_CHAR)
+#ifdef CONFIG_TTY_SIGTSTP
+      if (buf[i] == CONFIG_TTY_SIGTSTP_CHAR)
         {
-          return SIGSTP;
+          return SIGTSTP;
         }
 #endif
     }
@@ -102,13 +102,13 @@ static int uart_check_signo(const char *buf, size_t size)
  *   Check if the SIGINT character is anywhere in the newly received DMA
  *   buffer.
  *
- *   REVISIT:  We must also remove the SIGINT/SIGSTP character from the Rx
+ *   REVISIT:  We must also remove the SIGINT/SIGTSTP character from the Rx
  *   buffer.  It should not be read as normal data by the caller.
  *
  ****************************************************************************/
 
 #if defined(CONFIG_SERIAL_RXDMA) && \
-   (defined(CONFIG_TTY_SIGINT) || defined(CONFIG_TTY_SIGSTP))
+   (defined(CONFIG_TTY_SIGINT) || defined(CONFIG_TTY_SIGTSTP))
 static int uart_recvchars_signo(FAR uart_dev_t *dev)
 {
   FAR struct uart_dmaxfer_s *xfer = &dev->dmarx;
@@ -370,7 +370,7 @@ void uart_recvchars_done(FAR uart_dev_t *dev)
   FAR struct uart_dmaxfer_s *xfer = &dev->dmarx;
   FAR struct uart_buffer_s *rxbuf = &dev->recv;
   size_t nbytes = xfer->nbytes;
-#if defined(CONFIG_TTY_SIGINT) || defined(CONFIG_TTY_SIGSTP)
+#if defined(CONFIG_TTY_SIGINT) || defined(CONFIG_TTY_SIGTSTP)
   int signo = 0;
 
   /* Check if the SIGINT character is anywhere in the newly received DMA
@@ -398,7 +398,7 @@ void uart_recvchars_done(FAR uart_dev_t *dev)
       uart_datareceived(dev);
     }
 
-#if defined(CONFIG_TTY_SIGINT) || defined(CONFIG_TTY_SIGSTP)
+#if defined(CONFIG_TTY_SIGINT) || defined(CONFIG_TTY_SIGTSTP)
   /* Send the signal if necessary */
 
   if (signo != 0)
diff --git a/drivers/serial/serial_io.c b/drivers/serial/serial_io.c
index e162de9..ddd4c3a 100644
--- a/drivers/serial/serial_io.c
+++ b/drivers/serial/serial_io.c
@@ -139,7 +139,7 @@ void uart_recvchars(FAR uart_dev_t *dev)
 #endif
   unsigned int status;
   int nexthead = rxbuf->head + 1;
-#if defined(CONFIG_TTY_SIGINT) || defined(CONFIG_TTY_SIGSTP)
+#if defined(CONFIG_TTY_SIGINT) || defined(CONFIG_TTY_SIGTSTP)
   int signo = 0;
 #endif
   uint16_t nbytes = 0;
@@ -233,13 +233,13 @@ void uart_recvchars(FAR uart_dev_t *dev)
         }
       else
 #endif
-#ifdef CONFIG_TTY_SIGSTP
-      /* Is this the special character that will generate the SIGSTP
+#ifdef CONFIG_TTY_SIGTSTP
+      /* Is this the special character that will generate the SIGTSTP
        * signal?
        */
 
       if (dev->pid >= 0 && (dev->tc_lflag & ISIG) &&
-          ch == CONFIG_TTY_SIGSTP_CHAR)
+          ch == CONFIG_TTY_SIGTSTP_CHAR)
         {
 #ifdef CONFIG_TTY_SIGINT
           /* Give precedence to SIGINT */
@@ -251,7 +251,7 @@ void uart_recvchars(FAR uart_dev_t *dev)
                * into the Rx buffer.  It should not be read as normal data.
                */
 
-              signo = SIGSTP;
+              signo = SIGTSTP;
             }
         }
       else
@@ -292,7 +292,7 @@ void uart_recvchars(FAR uart_dev_t *dev)
       uart_datareceived(dev);
     }
 
-#if defined(CONFIG_TTY_SIGINT) || defined(CONFIG_TTY_SIGSTP)
+#if defined(CONFIG_TTY_SIGINT) || defined(CONFIG_TTY_SIGTSTP)
   /* Send the signal if necessary */
 
   if (signo != 0)
diff --git a/include/nuttx/serial/serial.h b/include/nuttx/serial/serial.h
index 1dc39c4..3a34d20 100644
--- a/include/nuttx/serial/serial.h
+++ b/include/nuttx/serial/serial.h
@@ -300,7 +300,7 @@ struct uart_dev_s
   tcflag_t             tc_iflag;     /* Input modes */
   tcflag_t             tc_oflag;     /* Output modes */
   tcflag_t             tc_lflag;     /* Local modes */
-#if defined(CONFIG_TTY_SIGINT) || defined(CONFIG_TTY_SIGSTP)
+#if defined(CONFIG_TTY_SIGINT) || defined(CONFIG_TTY_SIGTSTP)
   pid_t                pid;          /* Thread PID to receive signals (-1 if none) */
 #endif
 #endif
diff --git a/include/signal.h b/include/signal.h
index c247fde..6b48c38 100644
--- a/include/signal.h
+++ b/include/signal.h
@@ -168,7 +168,7 @@
 
 #ifdef CONFIG_SIG_SIGSTOP_ACTION
 #  define SIGSTOP     CONFIG_SIG_STOP
-#  define SIGSTP      CONFIG_SIG_STP
+#  define SIGTSTP     CONFIG_SIG_TSTP
 #  define SIGCONT     CONFIG_SIG_CONT
 #endif
 
diff --git a/libs/libc/string/lib_strsignal.c b/libs/libc/string/lib_strsignal.c
index 65438b4..f68fbcd 100644
--- a/libs/libc/string/lib_strsignal.c
+++ b/libs/libc/string/lib_strsignal.c
@@ -143,9 +143,9 @@ FAR char *strsignal(int signum)
         return (FAR char *)"SIGSTOP";
 #endif
 
-#ifdef SIGSTP
-      case SIGSTP:
-        return (FAR char *)"SIGSTP";
+#ifdef SIGTSTP
+      case SIGTSTP:
+        return (FAR char *)"SIGTSTP";
 #endif
 
 #ifdef SIGCONT
diff --git a/sched/Kconfig b/sched/Kconfig
index 86a1199..baef337 100644
--- a/sched/Kconfig
+++ b/sched/Kconfig
@@ -1382,10 +1382,10 @@ config SIG_SIGPOLL_ACTION
 		sigaction() to ignore SIGPOLL.
 
 config SIG_SIGSTOP_ACTION
-	bool "SIGSTOP SIGSTP, and SIGCONT"
+	bool "SIGSTOP SIGTSTP, and SIGCONT"
 	default y
 	---help---
-		Enable the default action for SIGSTOP and SIGSTP (suspend the
+		Enable the default action for SIGSTOP and SIGTSTP (suspend the
 		task) and SIGCONT (resume the task).
 
 config SIG_SIGKILL_ACTION
@@ -1452,8 +1452,8 @@ config SIG_STOP
 	---help---
 		Suspend/pause a task.  SIGSTOP may not be caught or ignored.
 
-config SIG_STP
-	int "SIGSTP"
+config SIG_TSTP
+	int "SIGTSTP"
 	default 7
 	depends on SIG_SIGSTOP_ACTION
 	---help---
diff --git a/sched/group/group_suspendchildren.c b/sched/group/group_suspendchildren.c
index 5fb67a1..e7a1e9d 100644
--- a/sched/group/group_suspendchildren.c
+++ b/sched/group/group_suspendchildren.c
@@ -86,7 +86,7 @@ static int group_suspend_children_handler(pid_t pid, FAR void *arg)
  *
  * Description:
  *   Suspend all children of a task except for the specified task.  This is
- *   SIGSTP/SIGSTOP default signal action logic.  When the main task is
+ *   SIGTSTP/SIGSTOP default signal action logic.  When the main task is
  *   suspended, all of its child pthreads must also be suspended.
  *
  * Input Parameters:
diff --git a/sched/init/nx_start.c b/sched/init/nx_start.c
index 927f8ff..73045ef 100644
--- a/sched/init/nx_start.c
+++ b/sched/init/nx_start.c
@@ -194,7 +194,7 @@ volatile dq_queue_t g_waitingforfill;
 
 #ifdef CONFIG_SIG_SIGSTOP_ACTION
 /* This is the list of all tasks that have been stopped
- * via SIGSTOP or SIGSTP
+ * via SIGSTOP or SIGTSTP
  */
 
 volatile dq_queue_t g_stoppedtasks;
diff --git a/sched/signal/sig_default.c b/sched/signal/sig_default.c
index 5dd018a..91a3dd6 100644
--- a/sched/signal/sig_default.c
+++ b/sched/signal/sig_default.c
@@ -134,7 +134,7 @@ static const struct nxsig_defaction_s g_defactions[] =
 #endif
 #ifdef CONFIG_SIG_SIGSTOP_ACTION
   { SIGSTOP, SIG_FLAG_NOCATCH, nxsig_stop_task },
-  { SIGSTP,  0,                nxsig_stop_task },
+  { SIGTSTP, 0,                nxsig_stop_task },
   { SIGCONT, SIG_FLAG_NOCATCH, nxsig_null_action },
 #endif
 #ifdef CONFIG_SIG_SIGKILL_ACTION
diff --git a/sched/signal/sig_dispatch.c b/sched/signal/sig_dispatch.c
index 4821acb..e57bbef 100644
--- a/sched/signal/sig_dispatch.c
+++ b/sched/signal/sig_dispatch.c
@@ -451,7 +451,7 @@ int nxsig_tcbdispatch(FAR struct tcb_s *stcb, siginfo_t *info)
 #endif
 
 #ifdef CONFIG_SIG_SIGSTOP_ACTION
-      /* If the task was stopped by SIGSTOP or SIGSTP, then unblock the task
+      /* If the task was stopped by SIGSTOP or SIGTSTP, then unblock the task
        * if SIGCONT is received.
        */
 


[incubator-nuttx] 02/02: include/nuttx/serial/serial.h: Fix nxstyle errors

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 51af06243f20756b7c6e3bf5fd7fc132c82fb854
Author: Yoshinori Sugino <ys...@gmail.com>
AuthorDate: Thu Oct 29 15:11:53 2020 +0900

    include/nuttx/serial/serial.h: Fix nxstyle errors
---
 include/nuttx/serial/serial.h | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/include/nuttx/serial/serial.h b/include/nuttx/serial/serial.h
index 3a34d20..147c5c2 100644
--- a/include/nuttx/serial/serial.h
+++ b/include/nuttx/serial/serial.h
@@ -355,7 +355,7 @@ extern "C"
 #endif
 
 /************************************************************************************
- * Public Functions
+ * Public Function Prototypes
  ************************************************************************************/
 
 /************************************************************************************
@@ -387,8 +387,8 @@ void uart_xmitchars(FAR uart_dev_t *dev);
  * Description:
  *   This function is called from the UART interrupt handler when an interrupt
  *   is received indicating that are bytes available to be received.  This
- *   function will add chars to head of receive buffer.  Driver read() logic will take
- *   characters from the tail of the buffer.
+ *   function will add chars to head of receive buffer.  Driver read() logic
+ *   will take characters from the tail of the buffer.
  *
  ************************************************************************************/
 
@@ -499,8 +499,8 @@ void uart_recvchars_done(FAR uart_dev_t *dev);
  * Name: uart_reset_sem
  *
  * Description:
- *   This function is called when need reset uart semaphore, this may used in kill one
- *   process, but this process was reading/writing with the semaphore.
+ *   This function is called when need reset uart semaphore, this may used in
+ *   kill one process, but this process was reading/writing with the semaphore.
  *
  ************************************************************************************/