pangzhen1xiaomi commented on code in PR #18072:
URL: https://github.com/apache/nuttx/pull/18072#discussion_r2780831959
##########
sched/wqueue/kwork_thread.c:
##########
@@ -578,9 +598,22 @@ int work_start_lowpri(void)
sinfo("Starting low-priority kernel worker thread(s)\n");
- return work_thread_create(LPWORKNAME, CONFIG_SCHED_LPWORKPRIORITY, NULL,
+#ifdef SCHED_LPWORKSTACKSECTION
+ static uint8_t lp_work_stack[CONFIG_SCHED_LPNTHREADS]
+ [CONFIG_SCHED_LPWORKSTACKSIZE]
+ locate_data(CONFIG_SCHED_LPWORKSTACKSECTION);
Review Comment:
> aligned_data just aligned the first stack, we should consider
CONFIG_SCHED_LPWORKSTACKSIZE also must align with arch requirement
Alright, the modifications below should be appropriate. Please check them.
Thank you.
#define LP_WORK_STACK_SIZE STACK_ALIGN_UP(CONFIG_SCHED_LPWORKSTACKSIZE)
static aligned_data(STACK_ALIGNMENT) uint8_t
lp_work_stack[CONFIG_SCHED_LPNTHREADS][LP_WORK_STACK_SIZE]
locate_data(CONFIG_SCHED_LPWORKSTACKSECTION);
return work_thread_create(LPWORKNAME,
CONFIG_SCHED_LPWORKPRIORITY,
lp_work_stack,
LP_WORK_STACK_SIZE,
(FAR struct kwork_wqueue_s *)&g_lpwork);
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]