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,