Browse Source

shell: make the backend thread name variable generic

Rename the shell backend `thread_name` variable to just `name`,
to be used for other things not specific to thread later.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
pull/64324/head
Yong Cong Sin 2 years ago committed by Carles Cufí
parent
commit
dd154406ba
  1. 4
      include/zephyr/shell/shell.h
  2. 2
      subsys/shell/shell.c

4
include/zephyr/shell/shell.h

@ -863,7 +863,7 @@ struct shell { @@ -863,7 +863,7 @@ struct shell {
LOG_INSTANCE_PTR_DECLARE(log);
const char *thread_name;
const char *name;
struct k_thread *thread;
k_thread_stack_t *stack;
};
@ -910,7 +910,7 @@ extern void z_shell_print_stream(const void *user_ctx, const char *data, @@ -910,7 +910,7 @@ extern void z_shell_print_stream(const void *user_ctx, const char *data,
.stats = Z_SHELL_STATS_PTR(_name), \
.log_backend = Z_SHELL_LOG_BACKEND_PTR(_name), \
LOG_INSTANCE_PTR_INIT(log, shell, _name) \
.thread_name = STRINGIFY(_name), \
.name = STRINGIFY(_name), \
.thread = &_name##_thread, \
.stack = _name##_stack \
}

2
subsys/shell/shell.c

@ -1392,7 +1392,7 @@ int shell_init(const struct shell *sh, const void *transport_config, @@ -1392,7 +1392,7 @@ int shell_init(const struct shell *sh, const void *transport_config,
SHELL_THREAD_PRIORITY, 0, K_NO_WAIT);
sh->ctx->tid = tid;
k_thread_name_set(tid, sh->thread_name);
k_thread_name_set(tid, sh->name);
return 0;
}

Loading…
Cancel
Save