From 82debdc2139ebb27071d230a66612db2f1ac3a11 Mon Sep 17 00:00:00 2001
From: Gregory Nutt Description.
Setup up stack-related information in the TCB using pre-allocated stack memory.
- This function is called only from
The following TCB fields must be initialized:
diff --git a/Documentation/NuttxUserGuide.html b/Documentation/NuttxUserGuide.html
index d0ac29f3f3a..600d32cc31f 100644
--- a/Documentation/NuttxUserGuide.html
+++ b/Documentation/NuttxUserGuide.html
@@ -14,7 +14,7 @@
User's Manual by Gregory Nutt
- Last Updated: October 16, 2019 Last Updated: May 25, 2020task_init() when a task or kernel thread is started (never for pthreads).
+ This function is called only from nxtask_init() when a task or kernel thread is started (never for pthreads).
NuttX Operating System
Non-standard extensions to VxWorks-like interfaces to support POSIX Cancellation Points. @@ -345,127 +343,7 @@ VxWorks provides the following similar interface:
-Function Prototype: -
- #include <sched.h> - int task_init(struct tcb_s *tcb, char *name, int priority, uint32_t *stack, uint32_t stack_size, - maint_t entry, char * const argv[]); -- -
-Description: -
- This function initializes a Task Control Block (TCB)
- in preparation for starting a new thread. It performs a subset
- of the functionality of task_create() (see above).
-
- Unlike task_create(), task_init() does not activate the task. - This must be done by calling task_activate(). -
--Input Parameters: -
tcb. Address of the new task's TCB
- name. Name of the new task (not used)
- priority. Priority of the new task
- stack. Start of the pre-allocated stack
- stack_size. size (in bytes) of the pre-allocated stack
- entry. Entry point of a new task
- argv. A pointer to an array of input parameters.
- The array should be terminated with a NULL argv[] value.
- If no parameters are required, argv may be NULL.
- -Returned Value: -
-OK, or ERROR if the task cannot be initialized.
-This function can only failure is it is unable to assign
- a new, unique task ID to the TCB (errno is not set).
-Assumptions/Limitations: -
-POSIX Compatibility: This is a NON-POSIX interface. -VxWorks provides the following similar interface: -
- STATUS taskInit(WIND_TCB *pTcb, char *name, int priority, int options, uint32_t *pStackBase, int stackSize, - FUNCPTR entryPt, int arg1, int arg2, int arg3, int arg4, int arg5, - int arg6, int arg7, int arg8, int arg9, int arg10); -- -
- The NuttX task_init() differs from VxWorks' taskInit() in the - following ways: -
--Function Prototype: -
- #include <sched.h> - int task_activate(struct tcb_s *tcb); -- -
-Description: This function activates tasks created by task_init(). -Without activation, a task is ineligible for execution by the -scheduler. -
-Input Parameters: -
tcb. The TCB for the task for the task (same as the
-task_init argument).
--Returned Value: -
errno is not set).
--Assumptions/Limitations: -
-POSIX Compatibility: This is a NON-POSIX interface. -VxWorks provides the following similar interface: -
- STATUS taskActivate(int tid); -- -
- The NuttX task_activate() differs from VxWorks' taskActivate() in the - following ways: -
-Function Prototype: @@ -534,7 +412,7 @@ STATUS taskDelete(int tid);
task_delete() will re-direct processing to exit().
-Function Prototype:
@@ -10691,15 +10569,13 @@ notify a task when a message is available on a queue.