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/09/11 02:41:33 UTC

[incubator-nuttx] branch master updated (3d07d45 -> f428160)

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 3d07d45  CI: Disable keeping ccache across builds
     new c8c2745  include/sys/types.h: add u_intXX_t support
     new 6dc3cbe  arch/Kconfig: add ARCH_HAVE_SERIAL_TERMIOS support to ARCH_SIM
     new f428160  signal: add SIGQUIT & SIGTERM support

The 3 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:
 arch/Kconfig                     |  1 +
 include/signal.h                 |  2 ++
 include/sys/types.h              | 12 ++++++++++++
 libs/libc/string/lib_strsignal.c | 10 ++++++++++
 sched/Kconfig                    | 18 +++++++++++++++++-
 sched/signal/sig_default.c       |  2 ++
 6 files changed, 44 insertions(+), 1 deletion(-)


[incubator-nuttx] 02/03: arch/Kconfig: add ARCH_HAVE_SERIAL_TERMIOS support to ARCH_SIM

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 6dc3cbe9cbec401c9e6c12468119a0544f155423
Author: ligd <li...@xiaomi.com>
AuthorDate: Tue Jul 14 11:19:58 2020 +0800

    arch/Kconfig: add ARCH_HAVE_SERIAL_TERMIOS support to ARCH_SIM
    
    Change-Id: I6f3c285aebd7b7989723709d1f956a56104958f4
    Signed-off-by: ligd <li...@xiaomi.com>
---
 arch/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/Kconfig b/arch/Kconfig
index 93a50ef..a9b1c38 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -69,6 +69,7 @@ config ARCH_SIM
 	bool "Simulation"
 	select ARCH_HAVE_MULTICPU
 	select ARCH_HAVE_RTC_SUBSECONDS
+	select ARCH_HAVE_SERIAL_TERMIOS
 	select ARCH_HAVE_TICKLESS
 	select ARCH_HAVE_POWEROFF
 	select ARCH_HAVE_TESTSET


[incubator-nuttx] 03/03: signal: add SIGQUIT & SIGTERM support

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 f428160dcc44b39774c6f36810a979de4ff88f24
Author: ligd <li...@xiaomi.com>
AuthorDate: Tue Jul 14 11:21:03 2020 +0800

    signal: add SIGQUIT & SIGTERM support
    
    SIGQUIT SIGTERM are equal with SIGINT now
    
    Change-Id: Iefc084d58db28003dc40a17f1ff3fbd7a0b716ed
---
 include/signal.h                 |  2 ++
 libs/libc/string/lib_strsignal.c | 10 ++++++++++
 sched/Kconfig                    | 18 +++++++++++++++++-
 sched/signal/sig_default.c       |  2 ++
 4 files changed, 31 insertions(+), 1 deletion(-)

diff --git a/include/signal.h b/include/signal.h
index 5697bbb..1846df2 100644
--- a/include/signal.h
+++ b/include/signal.h
@@ -175,6 +175,8 @@
 #ifdef CONFIG_SIG_SIGKILL_ACTION
 #  define SIGKILL     CONFIG_SIG_KILL
 #  define SIGINT      CONFIG_SIG_INT
+#  define SIGQUIT     CONFIG_SIG_QUIT
+#  define SIGTERM     CONFIG_SIG_TERM
 #endif
 
 #ifndef CONFIG_SIG_SIGPIPE
diff --git a/libs/libc/string/lib_strsignal.c b/libs/libc/string/lib_strsignal.c
index 53b3b54..9b8b3e1 100644
--- a/libs/libc/string/lib_strsignal.c
+++ b/libs/libc/string/lib_strsignal.c
@@ -163,6 +163,16 @@ FAR char *strsignal(int signum)
         return (FAR char *)"SIGINT";
 #endif
 
+#ifdef SIGQUIT
+      case SIGQUIT:
+        return (FAR char *)"SIGQUIT";
+#endif
+
+#ifdef SIGTERM
+      case SIGTERM:
+        return (FAR char *)"SIGTERM";
+#endif
+
       /* Non-standard signals */
 
 #ifdef SIGCONDTIMEDOUT
diff --git a/sched/Kconfig b/sched/Kconfig
index 1c94c69..f2cb415 100644
--- a/sched/Kconfig
+++ b/sched/Kconfig
@@ -1353,7 +1353,7 @@ config SIG_SIGSTOP_ACTION
 		task) and SIGCONT (resume the task).
 
 config SIG_SIGKILL_ACTION
-	bool "SIGINT and SIGKILL"
+	bool "SIGINT SIGKILL SIGQUIT and SIGTERM"
 	default y
 	---help---
 		Enable the default action for SIGINT and SIGKILL (terminate the
@@ -1449,6 +1449,22 @@ config SIG_INT
 		The SIGINT signal is sent to cause a task termination event.
 		SIGINT may be ignored or caught by the receiving task.
 
+config SIG_QUIT
+	int "SIGQUIT"
+	default 11
+	depends on SIG_SIGKILL_ACTION
+	---help---
+		The SIGINT signal is sent to cause a task termination event.
+		SIGQUIT may be ignored or caught by the receiving task.
+
+config SIG_TERM
+	int "SIGTERM"
+	default 12
+	depends on SIG_SIGKILL_ACTION
+	---help---
+		The SIGINT signal is sent to cause a task termination event.
+		SIGTERM may be ignored or caught by the receiving task.
+
 endif # SIG_DEFAULT
 
 config SIG_PIPE
diff --git a/sched/signal/sig_default.c b/sched/signal/sig_default.c
index 70a2238..5dd018a 100644
--- a/sched/signal/sig_default.c
+++ b/sched/signal/sig_default.c
@@ -140,6 +140,8 @@ static const struct nxsig_defaction_s g_defactions[] =
 #ifdef CONFIG_SIG_SIGKILL_ACTION
   { SIGINT,  0,                nxsig_abnormal_termination },
   { SIGKILL, SIG_FLAG_NOCATCH, nxsig_abnormal_termination },
+  { SIGQUIT, 0,                nxsig_abnormal_termination },
+  { SIGTERM, 0,                nxsig_abnormal_termination },
 #endif
 #ifdef CONFIG_SIG_SIGPIPE_ACTION
   { SIGPIPE, 0,                nxsig_abnormal_termination }


[incubator-nuttx] 01/03: include/sys/types.h: add u_intXX_t support

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 c8c2745fa71119250b4022e45058952045f960f6
Author: ligd <li...@xiaomi.com>
AuthorDate: Tue Jul 14 11:17:51 2020 +0800

    include/sys/types.h: add u_intXX_t support
    
    like u_int8_t u_int16_t u_in32_t...
    
    Change-Id: Ieee5014bddb1cf1a6e769af7258ff524263f67fb
    Signed-off-by: ligd <li...@xiaomi.com>
---
 include/sys/types.h | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/include/sys/types.h b/include/sys/types.h
index bce39a8..b55c9b3 100644
--- a/include/sys/types.h
+++ b/include/sys/types.h
@@ -290,6 +290,18 @@ typedef unsigned long  ulong;
 typedef signed char    s_char;
 typedef FAR char      *caddr_t;
 
+/* These were defined by ISO C without the first `_'.  */
+
+typedef uint8_t  u_int8_t;
+typedef uint16_t u_int16_t;
+typedef uint32_t u_int32_t;
+#ifdef __INT24_DEFINED
+typedef uint24_t u_int24_t;
+#endif
+#ifdef __INT64_DEFINED
+typedef uint64_t u_int64_t;
+#endif
+
 /* Task entry point */
 
 typedef CODE int (*main_t)(int argc, FAR char *argv[]);