From 43ede1859af5180251bfb0da5ab7eb5292fa9775 Mon Sep 17 00:00:00 2001 From: Meco Man <920369182@qq.com> Date: Wed, 24 Aug 2022 15:38:02 -0400 Subject: [kernel] 优化内置线程命名 main线程栈指定对齐字节数 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/components.c') 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 */ -- cgit v1.3.1