aboutsummaryrefslogtreecommitdiff
path: root/nuttx/sched/env_dup.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2013-01-26 23:49:02 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2013-01-26 23:49:02 +0000
commit47b94bafa5045532f239ea57a3610873b1a71368 (patch)
tree59eb55cb25bbd20b052a87de5838d80a410a1439 /nuttx/sched/env_dup.c
parentb82c36961aa730fc39a9fc8eac17e2518128cb67 (diff)
downloadpx4-firmware-47b94bafa5045532f239ea57a3610873b1a71368.tar.gz
px4-firmware-47b94bafa5045532f239ea57a3610873b1a71368.tar.bz2
px4-firmware-47b94bafa5045532f239ea57a3610873b1a71368.zip
Move socket data from TCB to task group structure.
git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5570 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/sched/env_dup.c')
-rw-r--r--nuttx/sched/env_dup.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/nuttx/sched/env_dup.c b/nuttx/sched/env_dup.c
index 479f7cae7..3b653b010 100644
--- a/nuttx/sched/env_dup.c
+++ b/nuttx/sched/env_dup.c
@@ -68,8 +68,8 @@
* exact duplicate of the parent task's environment.
*
* Parameters:
- * ctcb The child tcb to receive the newly allocated copy of the parent
- * TCB's environment structure with reference count equal to one
+ * group The child task group to receive the newly allocated copy of the
+ * parent task groups environment structure.
*
* Return Value:
* zero on success
@@ -79,14 +79,14 @@
*
****************************************************************************/
-int env_dup(FAR _TCB *ctcb)
+int env_dup(FAR struct task_group_s *group)
{
FAR _TCB *ptcb = (FAR _TCB*)g_readytorun.head;
FAR char *envp = NULL;
size_t envlen;
int ret = OK;
- DEBUGASSERT(ctcb && ptcb && ctcb->group && ptcb->group);
+ DEBUGASSERT(group && ptcb && ptcb->group);
/* Pre-emption must be disabled throughout the following because the
* environment may be shared.
@@ -108,8 +108,8 @@ int env_dup(FAR _TCB *ctcb)
}
else
{
- ctcb->group->tg_envsize = envlen;
- ctcb->group->tg_envp = envp;
+ group->tg_envsize = envlen;
+ group->tg_envp = envp;
memcpy(envp, ptcb->group->tg_envp, envlen);
}
}