You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2020/12/15 03:09:56 UTC

[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #2077: Fix the stack color failure when the thread stack setup through up_use_stack

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:
       We agreed that idle thread colorization should be done in assembly code from https://github.com/apache/incubator-nuttx/pull/1369, so 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.




----------------------------------------------------------------
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:
users@infra.apache.org