From 32d4ce8ee43227c7a630c7511b3f69a93c1a821e Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Sun, 8 Jul 2018 05:57:40 +0000 Subject: [PATCH] Added a termination check to the shell. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@12147 110e8d01-0319-4d1e-a829-52ad28d1bb01 --- os/various/shell/shell.c | 2 +- readme.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/os/various/shell/shell.c b/os/various/shell/shell.c index f699901ec..889d561f9 100644 --- a/os/various/shell/shell.c +++ b/os/various/shell/shell.c @@ -354,7 +354,7 @@ THD_FUNCTION(shellThread, p) { chprintf(chp, SHELL_NEWLINE_STR); chprintf(chp, "ChibiOS/RT Shell" SHELL_NEWLINE_STR); - while (true) { + while (!chThdShouldTerminateX()) { chprintf(chp, SHELL_PROMPT_STR); if (shellGetLine(scfg, line, sizeof(line), shp)) { #if (SHELL_CMD_EXIT_ENABLED == TRUE) && !defined(_CHIBIOS_NIL_) diff --git a/readme.txt b/readme.txt index 1da2ff19f..78f05549e 100644 --- a/readme.txt +++ b/readme.txt @@ -91,6 +91,7 @@ ***************************************************************************** *** Next *** +- NEW: Added a termination check to the shell. - NEW: Updated CMSIS to version 5.3.0. - NEW: Now chconf.h files have preprocessor checks around each definition, this allows to override settings from makefiles.