diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-09-01 16:49:42 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-09-01 16:49:42 -0600 |
commit | 1ea219af1ed405eba0c1de0cb35436f347d3d2ef (patch) | |
tree | 42b5451a5ded6601d0dece6551249345558c6520 | |
parent | 54ede74b8afa37595a4bb766033b981d4ace00e2 (diff) | |
download | px4-nuttx-1ea219af1ed405eba0c1de0cb35436f347d3d2ef.tar.gz px4-nuttx-1ea219af1ed405eba0c1de0cb35436f347d3d2ef.tar.bz2 px4-nuttx-1ea219af1ed405eba0c1de0cb35436f347d3d2ef.zip |
Fix error in initialize of IDLE TCB due to last change. The argument list is no long in the TCB, but in the stack. But not for the IDLE task. It needs its own mini-argv[] list so that it looks more like other threads.
-rw-r--r-- | nuttx/sched/init/os_start.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/nuttx/sched/init/os_start.c b/nuttx/sched/init/os_start.c index cf83b93b9..7879eaeec 100644 --- a/nuttx/sched/init/os_start.c +++ b/nuttx/sched/init/os_start.c @@ -218,6 +218,10 @@ static FAR struct task_tcb_s g_idletcb; static FAR const char g_idlename[] = "Idle Task"; +/* This the IDLE idle threads argument list. */ + +static char *g_idleargv[2]; + /**************************************************************************** * Private Function Prototypes ****************************************************************************/ @@ -311,13 +315,13 @@ void os_start(void) * and there is no support that yet. */ -#if !defined(CONFIG_BUILD_PROTECTED) && !defined(CONFIG_BUILD_KERNEL) #if CONFIG_TASK_NAME_SIZE > 0 - g_idletcb.argv[0] = g_idletcb.cmn.name; + g_idleargv[0] = g_idletcb.cmn.name; #else - g_idletcb.argv[0] = (char*)g_idlename; + g_idleargv[0] = (FAR char *)g_idlename; #endif /* CONFIG_TASK_NAME_SIZE */ -#endif /* !CONFIG_BUILD_PROTECTED && !CONFIG_BUILD_KERNEL */ + g_idleargv[1] = NULL; + g_idletcb.argv = &g_idleargv; /* Then add the idle task's TCB to the head of the ready to run list */ |