shell: modules: kernel: streamline code
This commit includes cleanups to `kernel_service`: - `shell_tdata_dump()`: Adjust formatting to align with `.clang-format`. - `shell_stack_dump()`: Update to pass `sh` directly instead of `user_data` since it is already assigned. Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
This commit is contained in:
parent
8fedee30ee
commit
b44250ae46
2 changed files with 10 additions and 10 deletions
|
|
@ -41,8 +41,8 @@ static void shell_stack_dump(const struct k_thread *thread, void *user_data)
|
||||||
/* Calculate the real size reserved for the stack */
|
/* Calculate the real size reserved for the stack */
|
||||||
pcnt = ((size - unused) * 100U) / size;
|
pcnt = ((size - unused) * 100U) / size;
|
||||||
|
|
||||||
shell_print(
|
shell_print(sh,
|
||||||
(const struct shell *)user_data, "%p %-" STRINGIFY(THREAD_MAX_NAM_LEN) "s "
|
"%p %-" STRINGIFY(THREAD_MAX_NAM_LEN) "s "
|
||||||
"(real size %4zu):\tunused %4zu\tusage %4zu / %4zu (%2u %%)",
|
"(real size %4zu):\tunused %4zu\tusage %4zu / %4zu (%2u %%)",
|
||||||
thread, tname ? tname : "NA", size, unused, size - unused, size, pcnt);
|
thread, tname ? tname : "NA", size, unused, size - unused, size, pcnt);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue