zyfeier commented on code in PR #19041:
URL: https://github.com/apache/nuttx/pull/19041#discussion_r3367087913


##########
arch/tricore/src/common/tricore_createstack.c:
##########
@@ -28,65 +28,23 @@
 
 #include <sys/types.h>
 #include <stdint.h>
-#include <sched.h>
 #include <assert.h>
-#include <nuttx/debug.h>
+#include <debug.h>
 
-#include <nuttx/kmalloc.h>
 #include <nuttx/arch.h>
-#include <nuttx/tls.h>
 #include <nuttx/board.h>
-#include <arch/board/board.h>
+#include <nuttx/kmalloc.h>
+#include <nuttx/sched.h>
 
 #include <tricore_internal.h>
 
 /****************************************************************************
  * Public Functions
  ****************************************************************************/
 
-/****************************************************************************
- * Name: up_create_stack
- *
- * Description:
- *   Allocate a stack for a new thread and setup up stack-related information
- *   in the TCB.
- *
- *   The following TCB fields must be initialized by this function:
- *
- *   - adj_stack_size: Stack size after adjustment for hardware, processor,
- *     etc.  This value is retained only for debug purposes.
- *   - stack_alloc_ptr: Pointer to allocated stack
- *   - stack_base_ptr: Adjusted stack base pointer after the TLS Data and
- *     Arguments has been removed from the stack allocation.
- *
- * Input Parameters:
- *   - tcb: The TCB of new task
- *   - stack_size:  The requested stack size.  At least this much
- *     must be allocated.
- *   - ttype:  The thread type.  This may be one of following (defined in
- *     include/nuttx/sched.h):
- *
- *       TCB_FLAG_TTYPE_TASK     Normal user task
- *       TCB_FLAG_TTYPE_PTHREAD  User pthread
- *       TCB_FLAG_TTYPE_KERNEL   Kernel thread
- *
- *     This thread type is normally available in the flags field of the TCB,
- *     however, there are certain contexts where the TCB may not be fully
- *     initialized when up_create_stack is called.
- *
- *     If CONFIG_BUILD_KERNEL is defined, then this thread type may affect
- *     how the stack is allocated.  For example, kernel thread stacks should
- *     be allocated from protected kernel memory.  Stacks for user tasks and
- *     threads must come from memory that is accessible to user code.
- *
- ****************************************************************************/
-
 int up_create_stack(struct tcb_s *tcb, size_t stack_size, uint8_t ttype)
 {
 #ifdef CONFIG_TLS_ALIGNED
-  /* The allocated stack size must not exceed the maximum possible for the

Review Comment:
   Why were these comments removed?



-- 
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]

Reply via email to