From f1c755306c5b45b33d8b373cb3d37fba7c9f89bf Mon Sep 17 00:00:00 2001 From: wdfk-prog <1425075683@qq.com> Date: Thu, 11 Sep 2025 08:22:03 +0800 Subject: [PATCH] feat:[shell] Add FINSH_SEM_NAME macro definition for unified semaphore naming --- components/finsh/shell.c | 2 +- components/finsh/shell.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/components/finsh/shell.c b/components/finsh/shell.c index 61c91954154..2fd3ab31a62 100644 --- a/components/finsh/shell.c +++ b/components/finsh/shell.c @@ -924,7 +924,7 @@ int finsh_system_init(void) FINSH_THREAD_PRIORITY, 10); #endif /* RT_USING_HEAP */ - rt_sem_init(&(shell->rx_sem), "shrx", 0, 0); + rt_sem_init(&(shell->rx_sem), FINSH_SEM_NAME, 0, 0); finsh_set_prompt_mode(1); if (tid != NULL && result == RT_EOK) diff --git a/components/finsh/shell.h b/components/finsh/shell.h index db4a77d5566..324a9d673a6 100644 --- a/components/finsh/shell.h +++ b/components/finsh/shell.h @@ -52,6 +52,8 @@ int finsh_set_prompt(const char *prompt); #define FINSH_THREAD_NAME "tshell" #endif +#define FINSH_SEM_NAME "shrx" + enum input_stat { WAIT_NORMAL,