SMP: Fix some dumb but difficult to debug errors

This commit is contained in:
Gregory Nutt 2016-02-16 16:43:19 -06:00
parent 384e51cb05
commit 6dfa72d038
2 changed files with 4 additions and 5 deletions

2
arch

@ -1 +1 @@
Subproject commit bceb7b7852a855d0de9afc4caeee801b4349db8e
Subproject commit 17b239501e1b11ae065586efe31f2c4e8ffd4122

View File

@ -418,8 +418,8 @@ void os_start(void)
/* Assign the process ID(s) of ZERO to the idle task(s) */
g_pidhash[PIDHASH(0)].tcb = &g_idletcb[cpu].cmn;
g_pidhash[PIDHASH(0)].pid = g_lastpid;
g_pidhash[PIDHASH(g_lastpid)].tcb = &g_idletcb[cpu].cmn;
g_pidhash[PIDHASH(g_lastpid)].pid = g_lastpid;
/* Initialize a TCB for this thread of execution. NOTE: The default
* value for most components of the g_idletcb are zero. The entire
@ -444,11 +444,10 @@ void os_start(void)
g_idletcb[cpu].cmn.entry.main = os_idletask;
}
else
#else
#endif
{
g_idletcb[cpu].cmn.entry.main = (main_t)os_start;
}
#endif
/* Set the task flags to indicate that this is a kernel thread and, if
* configured for SMP, that this task is assigned to the correct CPU.