diff options
author | Michał Barnaś <mb@semihalf.com> | 2021-09-22 13:57:42 +0200 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-09-22 20:12:54 +0000 |
commit | 93adc73adbfd0397730f96bfcdee27d5dee20fe6 (patch) | |
tree | 5a697351686a7a70d12d1c6979c6b796aa831bed /zephyr/shim | |
parent | 175dd9d084321ca1c119245c05111e4b1abb4a9b (diff) | |
download | chrome-ec-93adc73adbfd0397730f96bfcdee27d5dee20fe6.tar.gz |
zephyr: shell: add alias for kernel threads command
Add taskinfo command as alias for "kernel threads" for backward
compatibility with CrOS EC.
BRANCH=main
BUG=b:190224781
TEST=Check that taskinfo correctly executes "kernel threads" command
Change-Id: Ibdce9d8342fb7a99577b1f8d031c419fa485e7b0
Signed-off-by: Michał Barnaś <mb@semihalf.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3174058
Reviewed-by: Keith Short <keithshort@chromium.org>
Commit-Queue: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'zephyr/shim')
-rw-r--r-- | zephyr/shim/src/tasks.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/zephyr/shim/src/tasks.c b/zephyr/shim/src/tasks.c index 709af852c0..2f1fec16d6 100644 --- a/zephyr/shim/src/tasks.c +++ b/zephyr/shim/src/tasks.c @@ -6,6 +6,7 @@ #include <kernel.h> #include <init.h> #include <sys/atomic.h> +#include <shell/shell.h> #include "common.h" #include "timer.h" @@ -342,3 +343,11 @@ inline int in_interrupt_context(void) { return k_is_in_isr(); } + +#if IS_ENABLED(CONFIG_KERNEL_SHELL) && IS_ENABLED(CONFIG_THREAD_MONITOR) +static int taskinfo(const struct shell *shell, size_t argc, char **argv) +{ + return shell_execute_cmd(shell, "kernel threads"); +} +SHELL_CMD_REGISTER(taskinfo, NULL, "Threads statistics", taskinfo); +#endif |