mirror of
https://github.com/apache/nuttx.git
synced 2026-06-04 14:53:47 +08:00
This commit renames all internal OS functions defined under sched/task so that they begin with the prefix. For example, nxtask_exit() vs. task_exit().
Squashed commit of the following:
Trivial, cosmetic
sched/, arch/, and include: Rename task_vforkstart() as nxtask_vforkstart()
sched/, arch/, and include: Rename task_vforkabort() as nxtask_vforkabort()
sched/, arch/, and include: Rename task_vforksetup() as nxtask_vfork_setup()
sched/: Rename notify_cancellation() as nxnotify_cancellation()
sched/: Rename task_recover() to nxtask_recover()
sched/task, sched/pthread/, Documentation/: Rename task_argsetup() and task_terminate() to nxtask_argsetup() and nxtask_terminate(), respectively.
sched/task: Rename task_schedsetup() to nxtask_schedsetup()
sched/ (plus some binfmt/, include/, and arch/): Rename task_start() and task_starthook() to nxtask_start() and nxtask_starthook().
arch/ and sched/: Rename task_exit() and task_exithook() to nxtask_exit() and nxtask_exithook(), respectively.
sched/task: Rename all internal, static, functions to begin with the nx prefix.
This commit is contained in:
@@ -71,8 +71,8 @@
|
||||
*
|
||||
* 1) User code calls vfork(). vfork() collects context information and
|
||||
* transfers control up up_vfork().
|
||||
* 2) up_vfork()and calls task_vforksetup().
|
||||
* 3) task_vforksetup() allocates and configures the child task's TCB. This
|
||||
* 2) up_vfork()and calls nxtask_vforksetup().
|
||||
* 3) nxtask_vforksetup() allocates and configures the child task's TCB. This
|
||||
* consists of:
|
||||
* - Allocation of the child task's TCB.
|
||||
* - Initialization of file descriptors and streams
|
||||
@@ -83,8 +83,8 @@
|
||||
* - Allocate and initialize the stack
|
||||
* - Initialize special values in any CPU registers that were not
|
||||
* already configured by up_initial_state()
|
||||
* 5) up_vfork() then calls task_vforkstart()
|
||||
* 6) task_vforkstart() then executes the child thread.
|
||||
* 5) up_vfork() then calls nxtask_vforkstart()
|
||||
* 6) nxtask_vforkstart() then executes the child thread.
|
||||
*
|
||||
* Input Parameters:
|
||||
* None
|
||||
|
||||
@@ -72,8 +72,8 @@
|
||||
*
|
||||
* 1) User code calls vfork(). vfork() collects context information and
|
||||
* transfers control up up_vfork().
|
||||
* 2) up_vfork()and calls task_vforksetup().
|
||||
* 3) task_vforksetup() allocates and configures the child task's TCB. This
|
||||
* 2) up_vfork()and calls nxtask_vforksetup().
|
||||
* 3) nxtask_vforksetup() allocates and configures the child task's TCB. This
|
||||
* consists of:
|
||||
* - Allocation of the child task's TCB.
|
||||
* - Initialization of file descriptors and streams
|
||||
@@ -84,8 +84,8 @@
|
||||
* - Allocate and initialize the stack
|
||||
* - Initialize special values in any CPU registers that were not
|
||||
* already configured by up_initial_state()
|
||||
* 5) up_vfork() then calls task_vforkstart()
|
||||
* 6) task_vforkstart() then executes the child thread.
|
||||
* 5) up_vfork() then calls nxtask_vforkstart()
|
||||
* 6) nxtask_vforkstart() then executes the child thread.
|
||||
*
|
||||
* Input Parameters:
|
||||
* None
|
||||
|
||||
@@ -101,7 +101,7 @@ void up_initial_state(struct tcb_s *tcb)
|
||||
/* Set supervisor-mode and disable FIQs, regardless of how NuttX is
|
||||
* configured and of what kind of thread is being started. That is
|
||||
* because all threads, even user-mode threads will start in kernel
|
||||
* trampoline at task_start() or pthread_start(). The thread's
|
||||
* trampoline at nxtask_start() or pthread_start(). The thread's
|
||||
* privileges will be dropped before transitioning to user code.
|
||||
*/
|
||||
|
||||
|
||||
@@ -73,8 +73,8 @@
|
||||
*
|
||||
* 1) User code calls vfork(). vfork() collects context information and
|
||||
* transfers control up up_vfork().
|
||||
* 2) up_vfork()and calls task_vforksetup().
|
||||
* 3) task_vforksetup() allocates and configures the child task's TCB.
|
||||
* 2) up_vfork()and calls nxtask_vforksetup().
|
||||
* 3) nxtask_vforksetup() allocates and configures the child task's TCB.
|
||||
* This consists of:
|
||||
* - Allocation of the child task's TCB.
|
||||
* - Initialization of file descriptors and streams
|
||||
@@ -85,8 +85,8 @@
|
||||
* - Allocate and initialize the stack
|
||||
* - Initialize special values in any CPU registers that were not
|
||||
* already configured by up_initial_state()
|
||||
* 5) up_vfork() then calls task_vforkstart()
|
||||
* 6) task_vforkstart() then executes the child thread.
|
||||
* 5) up_vfork() then calls nxtask_vforkstart()
|
||||
* 6) nxtask_vforkstart() then executes the child thread.
|
||||
*
|
||||
* Input Parameters:
|
||||
* None
|
||||
|
||||
@@ -73,8 +73,8 @@
|
||||
*
|
||||
* 1) User code calls vfork(). vfork() collects context information and
|
||||
* transfers control up up_vfork().
|
||||
* 2) up_vfork()and calls task_vforksetup().
|
||||
* 3) task_vforksetup() allocates and configures the child task's TCB. This
|
||||
* 2) up_vfork()and calls nxtask_vforksetup().
|
||||
* 3) nxtask_vforksetup() allocates and configures the child task's TCB. This
|
||||
* consists of:
|
||||
* - Allocation of the child task's TCB.
|
||||
* - Initialization of file descriptors and streams
|
||||
@@ -85,8 +85,8 @@
|
||||
* - Allocate and initialize the stack
|
||||
* - Initialize special values in any CPU registers that were not
|
||||
* already configured by up_initial_state()
|
||||
* 5) up_vfork() then calls task_vforkstart()
|
||||
* 6) task_vforkstart() then executes the child thread.
|
||||
* 5) up_vfork() then calls nxtask_vforkstart()
|
||||
* 6) nxtask_vforkstart() then executes the child thread.
|
||||
*
|
||||
* Input Parameters:
|
||||
* None
|
||||
|
||||
@@ -74,8 +74,8 @@
|
||||
*
|
||||
* 1) User code calls vfork(). vfork() collects context information and
|
||||
* transfers control up up_vfork().
|
||||
* 2) up_vfork()and calls task_vforksetup().
|
||||
* 3) task_vforksetup() allocates and configures the child task's TCB. This
|
||||
* 2) up_vfork()and calls nxtask_vforksetup().
|
||||
* 3) nxtask_vforksetup() allocates and configures the child task's TCB. This
|
||||
* consists of:
|
||||
* - Allocation of the child task's TCB.
|
||||
* - Initialization of file descriptors and streams
|
||||
@@ -86,8 +86,8 @@
|
||||
* - Allocate and initialize the stack
|
||||
* - Initialize special values in any CPU registers that were not
|
||||
* already configured by up_initial_state()
|
||||
* 5) up_vfork() then calls task_vforkstart()
|
||||
* 6) task_vforkstart() then executes the child thread.
|
||||
* 5) up_vfork() then calls nxtask_vforkstart()
|
||||
* 6) nxtask_vforkstart() then executes the child thread.
|
||||
*
|
||||
* Input Parameters:
|
||||
* None
|
||||
|
||||
@@ -113,7 +113,7 @@ void up_initial_state(struct tcb_s *tcb)
|
||||
/* Set supervisor-mode and disable FIQs, regardless of how NuttX is
|
||||
* configured and of what kind of thread is being started. That is
|
||||
* because all threads, even user-mode threads will start in kernel
|
||||
* trampoline at task_start() or pthread_start(). The thread's
|
||||
* trampoline at nxtask_start() or pthread_start(). The thread's
|
||||
* privileges will be dropped before transitioning to user code.
|
||||
*/
|
||||
|
||||
|
||||
@@ -73,8 +73,8 @@
|
||||
*
|
||||
* 1) User code calls vfork(). vfork() collects context information and
|
||||
* transfers control up up_vfork().
|
||||
* 2) up_vfork()and calls task_vforksetup().
|
||||
* 3) task_vforksetup() allocates and configures the child task's TCB.
|
||||
* 2) up_vfork()and calls nxtask_vforksetup().
|
||||
* 3) nxtask_vforksetup() allocates and configures the child task's TCB.
|
||||
* This consists of:
|
||||
* - Allocation of the child task's TCB.
|
||||
* - Initialization of file descriptors and streams
|
||||
@@ -85,8 +85,8 @@
|
||||
* - Allocate and initialize the stack
|
||||
* - Initialize special values in any CPU registers that were not
|
||||
* already configured by up_initial_state()
|
||||
* 5) up_vfork() then calls task_vforkstart()
|
||||
* 6) task_vforkstart() then executes the child thread.
|
||||
* 5) up_vfork() then calls nxtask_vforkstart()
|
||||
* 6) nxtask_vforkstart() then executes the child thread.
|
||||
*
|
||||
* Input Parameters:
|
||||
* None
|
||||
|
||||
@@ -167,7 +167,7 @@ void _exit(int status)
|
||||
|
||||
/* Destroy the task at the head of the ready to run list. */
|
||||
|
||||
(void)task_exit();
|
||||
(void)nxtask_exit();
|
||||
|
||||
/* Now, perform the context switch to the new ready-to-run task at the
|
||||
* head of the list.
|
||||
|
||||
@@ -81,8 +81,8 @@
|
||||
*
|
||||
* 1) User code calls vfork(). vfork() collects context information and
|
||||
* transfers control up up_vfork().
|
||||
* 2) up_vfork()and calls task_vforksetup().
|
||||
* 3) task_vforksetup() allocates and configures the child task's TCB. This
|
||||
* 2) up_vfork()and calls nxtask_vforksetup().
|
||||
* 3) nxtask_vforksetup() allocates and configures the child task's TCB. This
|
||||
* consists of:
|
||||
* - Allocation of the child task's TCB.
|
||||
* - Initialization of file descriptors and streams
|
||||
@@ -93,10 +93,10 @@
|
||||
* - Allocate and initialize the stack
|
||||
* - Initialize special values in any CPU registers that were not
|
||||
* already configured by up_initial_state()
|
||||
* 5) up_vfork() then calls task_vforkstart()
|
||||
* 6) task_vforkstart() then executes the child thread.
|
||||
* 5) up_vfork() then calls nxtask_vforkstart()
|
||||
* 6) nxtask_vforkstart() then executes the child thread.
|
||||
*
|
||||
* task_vforkabort() may be called if an error occurs between steps 3 and 6.
|
||||
* nxtask_vforkabort() may be called if an error occurs between steps 3 and 6.
|
||||
*
|
||||
* Input Parameters:
|
||||
* context - Caller context information saved by vfork()
|
||||
@@ -131,10 +131,10 @@ pid_t up_vfork(const struct vfork_s *context)
|
||||
|
||||
/* Allocate and initialize a TCB for the child task. */
|
||||
|
||||
child = task_vforksetup((start_t)(context->lr & ~1), &argsize);
|
||||
child = nxtask_vforksetup((start_t)(context->lr & ~1), &argsize);
|
||||
if (!child)
|
||||
{
|
||||
serr("ERROR: task_vforksetup failed\n");
|
||||
serr("ERROR: nxtask_vforksetup failed\n");
|
||||
return (pid_t)ERROR;
|
||||
}
|
||||
|
||||
@@ -154,7 +154,7 @@ pid_t up_vfork(const struct vfork_s *context)
|
||||
if (ret != OK)
|
||||
{
|
||||
serr("ERROR: up_create_stack failed: %d\n", ret);
|
||||
task_vforkabort(child, -ret);
|
||||
nxtask_vforkabort(child, -ret);
|
||||
return (pid_t)ERROR;
|
||||
}
|
||||
|
||||
@@ -266,9 +266,9 @@ pid_t up_vfork(const struct vfork_s *context)
|
||||
}
|
||||
#endif
|
||||
|
||||
/* And, finally, start the child task. On a failure, task_vforkstart()
|
||||
* will discard the TCB by calling task_vforkabort().
|
||||
/* And, finally, start the child task. On a failure, nxtask_vforkstart()
|
||||
* will discard the TCB by calling nxtask_vforkabort().
|
||||
*/
|
||||
|
||||
return task_vforkstart(child);
|
||||
return nxtask_vforkstart(child);
|
||||
}
|
||||
|
||||
@@ -166,7 +166,7 @@ void _exit(int status)
|
||||
|
||||
/* Destroy the task at the head of the ready to run list. */
|
||||
|
||||
(void)task_exit();
|
||||
(void)nxtask_exit();
|
||||
|
||||
/* Now, perform the context switch to the new ready-to-run task at the
|
||||
* head of the list.
|
||||
|
||||
@@ -166,7 +166,7 @@ void _exit(int status)
|
||||
|
||||
/* Destroy the task at the head of the ready to run list. */
|
||||
|
||||
(void)task_exit();
|
||||
(void)nxtask_exit();
|
||||
|
||||
/* Now, perform the context switch to the new ready-to-run task at the
|
||||
* head of the list.
|
||||
|
||||
@@ -168,7 +168,7 @@ void _exit(int status)
|
||||
|
||||
/* Destroy the task at the head of the ready to run list. */
|
||||
|
||||
(void)task_exit();
|
||||
(void)nxtask_exit();
|
||||
|
||||
/* Now, perform the context switch to the new ready-to-run task at the
|
||||
* head of the list.
|
||||
|
||||
@@ -83,8 +83,8 @@
|
||||
*
|
||||
* 1) User code calls vfork(). vfork() collects context information and
|
||||
* transfers control up up_vfork().
|
||||
* 2) up_vfork()and calls task_vforksetup().
|
||||
* 3) task_vforksetup() allocates and configures the child task's TCB. This
|
||||
* 2) up_vfork()and calls nxtask_vforksetup().
|
||||
* 3) nxtask_vforksetup() allocates and configures the child task's TCB. This
|
||||
* consists of:
|
||||
* - Allocation of the child task's TCB.
|
||||
* - Initialization of file descriptors and streams
|
||||
@@ -95,10 +95,10 @@
|
||||
* - Allocate and initialize the stack
|
||||
* - Initialize special values in any CPU registers that were not
|
||||
* already configured by up_initial_state()
|
||||
* 5) up_vfork() then calls task_vforkstart()
|
||||
* 6) task_vforkstart() then executes the child thread.
|
||||
* 5) up_vfork() then calls nxtask_vforkstart()
|
||||
* 6) nxtask_vforkstart() then executes the child thread.
|
||||
*
|
||||
* task_vforkabort() may be called if an error occurs between steps 3 and 6.
|
||||
* nxtask_vforkabort() may be called if an error occurs between steps 3 and 6.
|
||||
*
|
||||
* Input Parameters:
|
||||
* context - Caller context information saved by vfork()
|
||||
@@ -151,10 +151,10 @@ pid_t up_vfork(const struct vfork_s *context)
|
||||
|
||||
/* Allocate and initialize a TCB for the child task. */
|
||||
|
||||
child = task_vforksetup((start_t)context->ra, &argsize);
|
||||
child = nxtask_vforksetup((start_t)context->ra, &argsize);
|
||||
if (!child)
|
||||
{
|
||||
sinfo("task_vforksetup failed\n");
|
||||
sinfo("nxtask_vforksetup failed\n");
|
||||
return (pid_t)ERROR;
|
||||
}
|
||||
|
||||
@@ -174,7 +174,7 @@ pid_t up_vfork(const struct vfork_s *context)
|
||||
if (ret != OK)
|
||||
{
|
||||
serr("ERROR: up_create_stack failed: %d\n", ret);
|
||||
task_vforkabort(child, -ret);
|
||||
nxtask_vforkabort(child, -ret);
|
||||
return (pid_t)ERROR;
|
||||
}
|
||||
|
||||
@@ -254,9 +254,9 @@ pid_t up_vfork(const struct vfork_s *context)
|
||||
child->cmn.xcp.regs[REG_GP] = newsp; /* Global pointer */
|
||||
#endif
|
||||
|
||||
/* And, finally, start the child task. On a failure, task_vforkstart()
|
||||
* will discard the TCB by calling task_vforkabort().
|
||||
/* And, finally, start the child task. On a failure, nxtask_vforkstart()
|
||||
* will discard the TCB by calling nxtask_vforkabort().
|
||||
*/
|
||||
|
||||
return task_vforkstart(child);
|
||||
return nxtask_vforkstart(child);
|
||||
}
|
||||
|
||||
@@ -71,8 +71,8 @@
|
||||
*
|
||||
* 1) User code calls vfork(). vfork() collects context information and
|
||||
* transfers control up up_vfork().
|
||||
* 2) up_vfork()and calls task_vforksetup().
|
||||
* 3) task_vforksetup() allocates and configures the child task's TCB. This
|
||||
* 2) up_vfork()and calls nxtask_vforksetup().
|
||||
* 3) nxtask_vforksetup() allocates and configures the child task's TCB. This
|
||||
* consists of:
|
||||
* - Allocation of the child task's TCB.
|
||||
* - Initialization of file descriptors and streams
|
||||
@@ -83,8 +83,8 @@
|
||||
* - Allocate and initialize the stack
|
||||
* - Initialize special values in any CPU registers that were not
|
||||
* already configured by up_initial_state()
|
||||
* 5) up_vfork() then calls task_vforkstart()
|
||||
* 6) task_vforkstart() then executes the child thread.
|
||||
* 5) up_vfork() then calls nxtask_vforkstart()
|
||||
* 6) nxtask_vforkstart() then executes the child thread.
|
||||
*
|
||||
* Input Parameters:
|
||||
* None
|
||||
|
||||
@@ -161,7 +161,7 @@ void _exit(int status)
|
||||
|
||||
/* Destroy the task at the head of the ready to run list. */
|
||||
|
||||
(void)task_exit();
|
||||
(void)nxtask_exit();
|
||||
|
||||
/* Now, perform the context switch to the new ready-to-run task at the
|
||||
* head of the list.
|
||||
|
||||
@@ -166,7 +166,7 @@ void _exit(int status)
|
||||
|
||||
/* Destroy the task at the head of the ready to run list. */
|
||||
|
||||
(void)task_exit();
|
||||
(void)nxtask_exit();
|
||||
|
||||
/* Now, perform the context switch to the new ready-to-run task at the
|
||||
* head of the list.
|
||||
|
||||
@@ -166,7 +166,7 @@ void _exit(int status)
|
||||
|
||||
/* Destroy the task at the head of the ready to run list. */
|
||||
|
||||
(void)task_exit();
|
||||
(void)nxtask_exit();
|
||||
|
||||
/* Now, perform the context switch to the new ready-to-run task at the
|
||||
* head of the list.
|
||||
|
||||
@@ -168,7 +168,7 @@ void _exit(int status)
|
||||
|
||||
/* Destroy the task at the head of the ready to run list. */
|
||||
|
||||
(void)task_exit();
|
||||
(void)nxtask_exit();
|
||||
|
||||
/* Now, perform the context switch to the new ready-to-run task at the
|
||||
* head of the list.
|
||||
|
||||
@@ -83,8 +83,8 @@
|
||||
*
|
||||
* 1) User code calls vfork(). vfork() collects context information and
|
||||
* transfers control up up_vfork().
|
||||
* 2) up_vfork()and calls task_vforksetup().
|
||||
* 3) task_vforksetup() allocates and configures the child task's TCB. This
|
||||
* 2) up_vfork()and calls nxtask_vforksetup().
|
||||
* 3) nxtask_vforksetup() allocates and configures the child task's TCB. This
|
||||
* consists of:
|
||||
* - Allocation of the child task's TCB.
|
||||
* - Initialization of file descriptors and streams
|
||||
@@ -95,10 +95,10 @@
|
||||
* - Allocate and initialize the stack
|
||||
* - Initialize special values in any CPU registers that were not
|
||||
* already configured by up_initial_state()
|
||||
* 5) up_vfork() then calls task_vforkstart()
|
||||
* 6) task_vforkstart() then executes the child thread.
|
||||
* 5) up_vfork() then calls nxtask_vforkstart()
|
||||
* 6) nxtask_vforkstart() then executes the child thread.
|
||||
*
|
||||
* task_vforkabort() may be called if an error occurs between steps 3 and 6.
|
||||
* nxtask_vforkabort() may be called if an error occurs between steps 3 and 6.
|
||||
*
|
||||
* Input Parameters:
|
||||
* context - Caller context information saved by vfork()
|
||||
@@ -155,10 +155,10 @@ pid_t up_vfork(const struct vfork_s *context)
|
||||
|
||||
/* Allocate and initialize a TCB for the child task. */
|
||||
|
||||
child = task_vforksetup((start_t)context->ra, &argsize);
|
||||
child = nxtask_vforksetup((start_t)context->ra, &argsize);
|
||||
if (!child)
|
||||
{
|
||||
sinfo("task_vforksetup failed\n");
|
||||
sinfo("nxtask_vforksetup failed\n");
|
||||
return (pid_t)ERROR;
|
||||
}
|
||||
|
||||
@@ -178,7 +178,7 @@ pid_t up_vfork(const struct vfork_s *context)
|
||||
if (ret != OK)
|
||||
{
|
||||
serr("ERROR: up_create_stack failed: %d\n", ret);
|
||||
task_vforkabort(child, -ret);
|
||||
nxtask_vforkabort(child, -ret);
|
||||
return (pid_t)ERROR;
|
||||
}
|
||||
|
||||
@@ -258,11 +258,11 @@ pid_t up_vfork(const struct vfork_s *context)
|
||||
child->cmn.xcp.regs[REG_GP] = newsp; /* Global pointer */
|
||||
#endif
|
||||
|
||||
/* And, finally, start the child task. On a failure, task_vforkstart()
|
||||
* will discard the TCB by calling task_vforkabort().
|
||||
/* And, finally, start the child task. On a failure, nxtask_vforkstart()
|
||||
* will discard the TCB by calling nxtask_vforkabort().
|
||||
*/
|
||||
|
||||
return task_vforkstart(child);
|
||||
return nxtask_vforkstart(child);
|
||||
}
|
||||
|
||||
#endif /* CONFIG_ARCH_HAVE_VFORK */
|
||||
|
||||
@@ -75,7 +75,7 @@ void _exit(int status)
|
||||
|
||||
/* Destroy the task at the head of the ready to run list. */
|
||||
|
||||
(void)task_exit();
|
||||
(void)nxtask_exit();
|
||||
|
||||
/* Now, perform the context switch to the new ready-to-run task at the
|
||||
* head of the list.
|
||||
|
||||
@@ -166,7 +166,7 @@ void _exit(int status)
|
||||
|
||||
/* Destroy the task at the head of the ready to run list. */
|
||||
|
||||
(void)task_exit();
|
||||
(void)nxtask_exit();
|
||||
|
||||
/* Now, perform the context switch to the new ready-to-run task at the
|
||||
* head of the list.
|
||||
|
||||
@@ -173,7 +173,7 @@ void _exit(int status)
|
||||
|
||||
/* Destroy the task at the head of the ready to run list. */
|
||||
|
||||
(void)task_exit();
|
||||
(void)nxtask_exit();
|
||||
|
||||
/* Now, perform the context switch to the new ready-to-run task at the
|
||||
* head of the list.
|
||||
|
||||
@@ -166,7 +166,7 @@ void _exit(int status)
|
||||
|
||||
/* Destroy the task at the head of the ready to run list. */
|
||||
|
||||
(void)task_exit();
|
||||
(void)nxtask_exit();
|
||||
|
||||
/* Now, perform the context switch to the new ready-to-run task at the
|
||||
* head of the list.
|
||||
|
||||
@@ -168,7 +168,7 @@ void _exit(int status)
|
||||
|
||||
/* Destroy the task at the head of the ready to run list. */
|
||||
|
||||
(void)task_exit();
|
||||
(void)nxtask_exit();
|
||||
|
||||
/* Now, perform the context switch to the new ready-to-run task at the
|
||||
* head of the list.
|
||||
|
||||
Reference in New Issue
Block a user