diff options
author | Giovanni Di Sirio <gdisirio@gmail.com> | 2019-01-27 08:15:50 +0000 |
---|---|---|
committer | Giovanni Di Sirio <gdisirio@gmail.com> | 2019-01-27 08:15:50 +0000 |
commit | db8497567e77f8f4159ef11918d9dbae80a72a1e (patch) | |
tree | 3925cae08a3b1f9ce32928d3f2e5e6303d1c0dc7 /os/various | |
parent | d773d9c1d2597a0a5e5ee4ebe7b0fafe9d1be6f3 (diff) | |
download | ChibiOS-db8497567e77f8f4159ef11918d9dbae80a72a1e.tar.gz ChibiOS-db8497567e77f8f4159ef11918d9dbae80a72a1e.tar.bz2 ChibiOS-db8497567e77f8f4159ef11918d9dbae80a72a1e.zip |
Added missing NIL checks to shell.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/stable_19.1.x@12607 110e8d01-0319-4d1e-a829-52ad28d1bb01
Diffstat (limited to 'os/various')
-rw-r--r-- | os/various/shell/shell.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/os/various/shell/shell.c b/os/various/shell/shell.c index 889d561f9..2df34d221 100644 --- a/os/various/shell/shell.c +++ b/os/various/shell/shell.c @@ -38,10 +38,12 @@ /* Module exported variables. */
/*===========================================================================*/
+#if !defined(_CHIBIOS_NIL_) || defined(__DOXYGEN__)
/**
* @brief Shell termination event source.
*/
event_source_t shell_terminated;
+#endif
/*===========================================================================*/
/* Module local types. */
@@ -354,7 +356,11 @@ THD_FUNCTION(shellThread, p) { chprintf(chp, SHELL_NEWLINE_STR);
chprintf(chp, "ChibiOS/RT Shell" SHELL_NEWLINE_STR);
+#if !defined(_CHIBIOS_NIL_)
while (!chThdShouldTerminateX()) {
+#else
+ while (true) {
+#endif
chprintf(chp, SHELL_PROMPT_STR);
if (shellGetLine(scfg, line, sizeof(line), shp)) {
#if (SHELL_CMD_EXIT_ENABLED == TRUE) && !defined(_CHIBIOS_NIL_)
@@ -398,7 +404,9 @@ THD_FUNCTION(shellThread, p) { }
}
}
+#if !defined(_CHIBIOS_NIL_)
shellExit(MSG_OK);
+#endif
}
/**
@@ -408,7 +416,9 @@ THD_FUNCTION(shellThread, p) { */
void shellInit(void) {
+#if !defined(_CHIBIOS_NIL_)
chEvtObjectInit(&shell_terminated);
+#endif
}
#if !defined(_CHIBIOS_NIL_) || defined(__DOXYGEN__)
|