From 0fd433eda0949291283a8627e0663c8a107cbbd6 Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Sun, 11 Aug 2019 07:08:25 +0000 Subject: [PATCH] Added an option to change the shell thread name. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@12948 27425a3e-05d8-49a3-a47f-9c15f0e5edd8 --- os/various/shell/shell.c | 4 ++++ os/various/shell/shell.h | 7 +++++++ readme.txt | 1 + 3 files changed, 12 insertions(+) diff --git a/os/various/shell/shell.c b/os/various/shell/shell.c index 2df34d221..19db9aae3 100644 --- a/os/various/shell/shell.c +++ b/os/various/shell/shell.c @@ -340,6 +340,10 @@ THD_FUNCTION(shellThread, p) { char *lp, *cmd, *tokp, line[SHELL_MAX_LINE_LENGTH]; char *args[SHELL_MAX_ARGUMENTS + 1]; +#if !defined(_CHIBIOS_NIL_) + chRegSetThreadName(SHELL_THREAD_NAME); +#endif + #if SHELL_USE_HISTORY == TRUE *(scfg->sc_histbuf) = 0; ShellHistory hist = { diff --git a/os/various/shell/shell.h b/os/various/shell/shell.h index cecf5969b..d11adc08a 100644 --- a/os/various/shell/shell.h +++ b/os/various/shell/shell.h @@ -106,6 +106,13 @@ #define SHELL_NEWLINE_STR "\r\n" #endif +/** + * @brief Default shell thread name. + */ +#if !defined(SHELL_THREAD_NAME) || defined(__DOXYGEN__) +#define SHELL_THREAD_NAME "shell" +#endif + /*===========================================================================*/ /* Derived constants and error checks. */ /*===========================================================================*/ diff --git a/readme.txt b/readme.txt index b12b223ea..5b1d6b796 100644 --- a/readme.txt +++ b/readme.txt @@ -74,6 +74,7 @@ ***************************************************************************** *** Next *** +- NEW: Added an option to change the shell thread name. - NEW: Made bus acquire/release functions in SNOR driver public. - NEW: Added mcuconf.h generator for STM32L052/L053/L062/L063. - NEW: Added mcuconf.h generator for STM32L072/L073.