Skip to content

Commit f31c678

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

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

components/finsh/SConscript

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ src = Split('''
66
shell.c
77
msh.c
88
msh_parse.c
9+
cmd.c
910
''')
1011

1112
CPPPATH = [cwd]
@@ -14,9 +15,6 @@ LOCAL_CFLAGS = ''
1415
if rtconfig.PLATFORM in ['gcc']: # only for GCC
1516
LOCAL_CFLAGS += ' -Wstack-usage=' + str(GetConfigValue('FINSH_THREAD_STACK_SIZE')) # check finsh thread stack size
1617

17-
if GetDepend('MSH_USING_BUILT_IN_COMMANDS'):
18-
src += ['cmd.c']
19-
2018
if GetDepend('DFS_USING_POSIX'):
2119
src += ['msh_file.c']
2220

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)