summaryrefslogtreecommitdiff
path: root/nuttx/binfmt/binfmt_execmodule.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2013-02-04 21:24:00 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2013-02-04 21:24:00 +0000
commitf34406ac488b6d5fb2f50f026e1964fb33ae649d (patch)
tree7d51b44539ecbfa57e4550023a92357dda1b70e3 /nuttx/binfmt/binfmt_execmodule.c
parent7071ca9d21d783827f93fcd25631aa2da8df8fe4 (diff)
downloadnuttx-f34406ac488b6d5fb2f50f026e1964fb33ae649d.tar.gz
nuttx-f34406ac488b6d5fb2f50f026e1964fb33ae649d.tar.bz2
nuttx-f34406ac488b6d5fb2f50f026e1964fb33ae649d.zip
Divide struct tcb_s into structs task_tcb_s and pthread_tcb_s
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5611 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/binfmt/binfmt_execmodule.c')
-rw-r--r--nuttx/binfmt/binfmt_execmodule.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/nuttx/binfmt/binfmt_execmodule.c b/nuttx/binfmt/binfmt_execmodule.c
index 7d7f00b33..bb91d78c5 100644
--- a/nuttx/binfmt/binfmt_execmodule.c
+++ b/nuttx/binfmt/binfmt_execmodule.c
@@ -134,7 +134,7 @@ static void exec_ctors(FAR void *arg)
int exec_module(FAR const struct binary_s *binp)
{
- FAR struct tcb_s *tcb;
+ FAR struct task_tcb_s *tcb;
#ifndef CONFIG_CUSTOM_STACK
FAR uint32_t *stack;
#endif
@@ -156,7 +156,7 @@ int exec_module(FAR const struct binary_s *binp)
/* Allocate a TCB for the new task. */
- tcb = (FAR struct tcb_s*)kzalloc(sizeof(struct tcb_s));
+ tcb = (FAR struct task_tcb_s*)kzalloc(sizeof(struct task_tcb_s));
if (!tcb)
{
err = ENOMEM;
@@ -198,17 +198,17 @@ int exec_module(FAR const struct binary_s *binp)
*/
#ifdef CONFIG_PIC
- tcb->dspace = binp->alloc[0];
+ tcb->cmn.dspace = binp->alloc[0];
/* Re-initialize the task's initial state to account for the new PIC base */
- up_initial_state(tcb);
+ up_initial_state(&tcb->cmn);
#endif
/* Assign the address environment to the task */
#ifdef CONFIG_ADDRENV
- ret = up_addrenv_assign(binp->addrenv, tcb);
+ ret = up_addrenv_assign(binp->addrenv, &tcb->cmn);
if (ret < 0)
{
err = -ret;
@@ -228,7 +228,7 @@ int exec_module(FAR const struct binary_s *binp)
/* Get the assigned pid before we start the task */
- pid = tcb->pid;
+ pid = tcb->cmn.pid;
/* Then activate the task at the provided priority */
@@ -244,11 +244,11 @@ int exec_module(FAR const struct binary_s *binp)
errout_with_stack:
#ifndef CONFIG_CUSTOM_STACK
- tcb->stack_alloc_ptr = NULL;
- sched_releasetcb(tcb);
+ tcb->cmn.stack_alloc_ptr = NULL;
+ sched_releasetcb(&tcb->cmn);
kfree(stack);
#else
- sched_releasetcb(tcb);
+ sched_releasetcb(&tcb->cmn);
#endif
goto errout;