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 2022/01/31 04:58:56 UTC

[GitHub] [incubator-nuttx] yamt commented on a change in pull request #5384: arch/sim: Adjust the stack size for up_use_stack too

yamt commented on a change in pull request #5384:
URL: https://github.com/apache/incubator-nuttx/pull/5384#discussion_r795343256



##########
File path: arch/sim/src/sim/up_usestack.c
##########
@@ -113,4 +114,11 @@ int up_use_stack(FAR struct tcb_s *tcb, FAR void *stack, size_t stack_size)
 #endif
 
   return OK;
+#else
+  /* Ignore the stack argument and allocate a new stack instead
+   * since it's impossible to extend a preallocated memory in place.
+   */
+
+  return up_create_stack(tcb, stack_size, tcb->flags & TCB_FLAG_TTYPE_MASK);

Review comment:
       `up_tls_size() + stack_size`?




-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org