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>
This commit is contained in:
parent
8c5a15aac4
commit
dd154406ba
2 changed files with 3 additions and 3 deletions
|
@ -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,
|
|||
.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 \
|
||||
}
|
||||
|
|
|
@ -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…
Add table
Add a link
Reference in a new issue