xiaoxiang781216 commented on a change in pull request #2077:
URL: https://github.com/apache/incubator-nuttx/pull/2077#discussion_r543011793
##########
File path: arch/arm/src/arm/arm_initialstate.c
##########
@@ -75,8 +75,10 @@ void up_initial_state(struct tcb_s *tcb)
if (tcb->pid == 0)
{
- up_use_stack(tcb, (void *)(g_idle_topstack -
- CONFIG_IDLETHREAD_STACKSIZE), CONFIG_IDLETHREAD_STACKSIZE);
+ tcb->stack_alloc_ptr = (void *)(g_idle_topstack -
+ CONFIG_IDLETHREAD_STACKSIZE);
+ tcb->adj_stack_ptr = (void *)g_idle_topstack;
+ tcb->adj_stack_size = CONFIG_IDLETHREAD_STACKSIZE;
}
Review comment:
Becase we agreed that idle thread colorization should be done in
assembly code from https://github.com/apache/incubator-nuttx/pull/1369,
up_use_stack isn't used to color the idle thread stack anymore.
BTW, up_use_stack and idle thread tcb is seldom referenced in the code base
and the check is introduced in
https://github.com/apache/incubator-nuttx/pull/1369 too. So it make sense to
remove the check.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]