summaryrefslogtreecommitdiff
path: root/nuttx/arch/hc/src/common/up_usestack.c
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/arch/hc/src/common/up_usestack.c')
-rw-r--r--nuttx/arch/hc/src/common/up_usestack.c26
1 files changed, 17 insertions, 9 deletions
diff --git a/nuttx/arch/hc/src/common/up_usestack.c b/nuttx/arch/hc/src/common/up_usestack.c
index f23677be5..7f3c8fc66 100644
--- a/nuttx/arch/hc/src/common/up_usestack.c
+++ b/nuttx/arch/hc/src/common/up_usestack.c
@@ -64,19 +64,27 @@
* Name: up_use_stack
*
* Description:
- * Setup up stack-related information in the TCB using pre-allocated
- * stack memory
+ * Setup up stack-related information in the TCB using pre-allocated stack
+ * memory. This function is called only from task_init() when a task or
+ * kernel thread is started (never for pthreads).
*
* The following TCB fields must be initialized:
- * 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
- * adj_stack_ptr: Adjusted stack_alloc_ptr for HW. The initial value of the
- * stack pointer.
+ *
+ * - 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
+ * - adj_stack_ptr: Adjusted stack_alloc_ptr for HW. The
+ * initial value of the stack pointer.
*
* Inputs:
- * tcb: The TCB of new task
- * stack_size: The allocated stack size.
+ * - tcb: The TCB of new task
+ * - stack_size: The allocated stack size.
+ *
+ * NOTE: Unlike up_stack_create() and up_stack_release, this function
+ * does not require the task type (ttype) parameter. The TCB flags will
+ * always be set to provide the task type to up_use_stack() if it needs
+ * that information.
*
****************************************************************************/