summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2018-01-12 20:54:17 +0800
committerGitHub <[email protected]>2018-01-12 20:54:17 +0800
commit12e0b7037ea515538365e03891dbd1ecda78f1fe (patch)
tree136a450dd2ae87c52b1677248ba23cef49188a08
parent15e73427451b5e5ef001af57b6b354acc297109c (diff)
parentcfd82c260dc51a4aacdaec487e025a522c1a19fa (diff)
Merge pull request #1163 from armink/fix_finsh_name
[Finsh] Add finsh thread name macro.
-rw-r--r--components/finsh/shell.c2
-rw-r--r--components/finsh/shell.h4
2 files changed, 5 insertions, 1 deletions
diff --git a/components/finsh/shell.c b/components/finsh/shell.c
index 90792e0039..d1fadd7221 100644
--- a/components/finsh/shell.c
+++ b/components/finsh/shell.c
@@ -776,7 +776,7 @@ int finsh_system_init(void)
rt_sem_init(&(shell->rx_sem), "shrx", 0, 0);
result = rt_thread_init(&finsh_thread,
- "tshell",
+ FINSH_THREAD_NAME,
finsh_thread_entry, RT_NULL,
&finsh_thread_stack[0], sizeof(finsh_thread_stack),
FINSH_THREAD_PRIORITY, 10);
diff --git a/components/finsh/shell.h b/components/finsh/shell.h
index 51494cb07b..7d5dd47076 100644
--- a/components/finsh/shell.h
+++ b/components/finsh/shell.h
@@ -73,6 +73,10 @@ const char* finsh_get_prompt(void);
#endif
#endif /* FINSH_USING_AUTH */
+#ifndef FINSH_THREAD_NAME
+#define FINSH_THREAD_NAME "tshell"
+#endif
+
enum input_stat
{
WAIT_NORMAL,