shell: Fix immediate logging case
When logging is using immediate mode then logging messages can be processed from any context, including interrupt context. z_shell_fprintf was asserting in that case since it allowed to be called from interrupt context only when logging was in panic mode. However, shell works in the same way when logging is in immediate mode as in panic mode. Renamed internal shell flag from panic_mode to sync_mode. Flag is also set when shell log backend is started in synchronous mode (immediate logging) which prevents assertion. Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
This commit is contained in:
parent
a89e60d7d8
commit
4100c57faa
4 changed files with 8 additions and 7 deletions
|
@ -649,7 +649,7 @@ struct shell_backend_ctx_flags {
|
|||
uint32_t last_nl :8; /*!< Last received new line character */
|
||||
uint32_t cmd_ctx :1; /*!< Shell is executing command */
|
||||
uint32_t print_noinit :1; /*!< Print request from not initialized shell */
|
||||
uint32_t panic_mode :1; /*!< Shell in panic mode */
|
||||
uint32_t sync_mode :1; /*!< Shell in synchronous mode */
|
||||
};
|
||||
|
||||
BUILD_ASSERT((sizeof(struct shell_backend_ctx_flags) == sizeof(uint32_t)),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue