Skip to content

Commit f1c7553

Browse files
committed
feat:[shell] Add FINSH_SEM_NAME macro definition for unified semaphore naming
1 parent 5abce84 commit f1c7553

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

components/finsh/shell.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -924,7 +924,7 @@ int finsh_system_init(void)
924924
FINSH_THREAD_PRIORITY, 10);
925925
#endif /* RT_USING_HEAP */
926926

927-
rt_sem_init(&(shell->rx_sem), "shrx", 0, 0);
927+
rt_sem_init(&(shell->rx_sem), FINSH_SEM_NAME, 0, 0);
928928
finsh_set_prompt_mode(1);
929929

930930
if (tid != NULL && result == RT_EOK)

components/finsh/shell.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ int finsh_set_prompt(const char *prompt);
5252
#define FINSH_THREAD_NAME "tshell"
5353
#endif
5454

55+
#define FINSH_SEM_NAME "shrx"
56+
5557
enum input_stat
5658
{
5759
WAIT_NORMAL,

0 commit comments

Comments
 (0)