summaryrefslogtreecommitdiff
path: root/src/components.c
diff options
context:
space:
mode:
authorMeco Man <[email protected]>2022-08-24 15:38:02 -0400
committerguo <[email protected]>2022-08-25 10:11:35 +0800
commit43ede1859af5180251bfb0da5ab7eb5292fa9775 (patch)
tree4396976d729e54c8847eb49b4b16ccf3d66cf58a /src/components.c
parentd49ac097ab97fc1b5a96ef6f50ab7eaa8a6ba332 (diff)
[kernel] 优化内置线程命名
main线程栈指定对齐字节数
Diffstat (limited to 'src/components.c')
-rw-r--r--src/components.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/components.c b/src/components.c
index 9433b7457c..37519c042a 100644
--- a/src/components.c
+++ b/src/components.c
@@ -166,8 +166,8 @@ int entry(void)
#ifndef RT_USING_HEAP
/* if there is not enable heap, we should use static thread and stack. */
-ALIGN(8)
-static rt_uint8_t main_stack[RT_MAIN_THREAD_STACK_SIZE];
+ALIGN(RT_ALIGN_SIZE)
+static rt_uint8_t main_thread_stack[RT_MAIN_THREAD_STACK_SIZE];
struct rt_thread main_thread;
#endif /* RT_USING_HEAP */
@@ -216,7 +216,7 @@ void rt_application_init(void)
tid = &main_thread;
result = rt_thread_init(tid, "main", main_thread_entry, RT_NULL,
- main_stack, sizeof(main_stack), RT_MAIN_THREAD_PRIORITY, 20);
+ main_thread_stack, sizeof(main_thread_stack), RT_MAIN_THREAD_PRIORITY, 20);
RT_ASSERT(result == RT_EOK);
/* if not define RT_USING_HEAP, using to eliminate the warning */