Skip to content
Snippets Groups Projects
Commit 0e3c182e authored by Gregory Nutt's avatar Gregory Nutt
Browse files

Fix error in initialize of IDLE TCB due to last change. The argument list is...

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.
parent 69012cd4
No related branches found
No related tags found
No related merge requests found
......@@ -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 */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment