sched: Avoid call up_initial_state for idle thread twice
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com> Change-Id: Iaf5d4bcc915fbe842e9356ea6416f0af869ab116
This commit is contained in:
parent
69e97c19ea
commit
56fa98f3ea
@ -168,11 +168,7 @@ int nx_smp_start(void)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Reinitialize the processor-specific portion of the TCB. This is
|
||||
* the second time this has been called for this CPU, but the stack
|
||||
* was not yet initialized on the first call so we need to do it
|
||||
* again.
|
||||
*/
|
||||
/* Initialize the processor-specific portion of the TCB */
|
||||
|
||||
up_initial_state(tcb);
|
||||
}
|
||||
|
@ -528,9 +528,14 @@ void nx_start(void)
|
||||
|
||||
g_running_tasks[cpu] = &g_idletcb[cpu].cmn;
|
||||
|
||||
/* Initialize the processor-specific portion of the TCB */
|
||||
/* Initialize the 1st processor-specific portion of the TCB
|
||||
* Note: other idle thread get initialized in nx_smpstart
|
||||
*/
|
||||
|
||||
up_initial_state(&g_idletcb[cpu].cmn);
|
||||
if (cpu == 0)
|
||||
{
|
||||
up_initial_state(&g_idletcb[cpu].cmn);
|
||||
}
|
||||
}
|
||||
|
||||
/* Task lists are initialized */
|
||||
|
Loading…
Reference in New Issue
Block a user