mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-21 07:13:34 +08:00
Move environment variables in the task group structure
git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5565 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
+3
-10
@@ -47,7 +47,7 @@
|
||||
#include <nuttx/arch.h>
|
||||
|
||||
#include "os_internal.h"
|
||||
#include "env_internal.h"
|
||||
#include "group_internal.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
@@ -145,10 +145,6 @@ int task_init(FAR _TCB *tcb, const char *name, int priority,
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Clone the parent's task environment */
|
||||
|
||||
(void)env_dup(tcb);
|
||||
|
||||
/* Configure the user provided stack region */
|
||||
|
||||
#ifndef CONFIG_CUSTOM_STACK
|
||||
@@ -162,7 +158,7 @@ int task_init(FAR _TCB *tcb, const char *name, int priority,
|
||||
if (ret < OK)
|
||||
{
|
||||
errcode = -ret;
|
||||
goto errout_with_env;
|
||||
goto errout_with_group;
|
||||
}
|
||||
|
||||
/* Setup to pass parameters to the new task */
|
||||
@@ -176,14 +172,11 @@ int task_init(FAR _TCB *tcb, const char *name, int priority,
|
||||
if (ret < 0)
|
||||
{
|
||||
errcode = -ret;
|
||||
goto errout_with_env;
|
||||
goto errout_with_group;
|
||||
}
|
||||
#endif
|
||||
return OK;
|
||||
|
||||
errout_with_env:
|
||||
env_release(tcb);
|
||||
|
||||
errout_with_group:
|
||||
#ifdef HAVE_TASK_GROUP
|
||||
group_leave(tcb);
|
||||
|
||||
Reference in New Issue
Block a user