Initialise the initial process pointer to NULL so that we know we don't

have an idle process yet.
I'm guessing that on my system this was always 0 already.

found by: Ed Schouten
This commit is contained in:
Julian Elischer 2007-10-27 00:42:40 +00:00
parent 21f7958604
commit fbf7046447
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=173050

View File

@ -58,6 +58,7 @@ idle_setup(void *dummy)
struct thread *td;
int error;
p = NULL; /* start with no idle process */
#ifdef SMP
SLIST_FOREACH(pc, &cpuhead, pc_allcpu) {
#endif
@ -70,7 +71,6 @@ idle_setup(void *dummy)
RFSTOPPED | RFHIGHPID, 0, "idled", "idle");
PCPU_SET(idlethread, td);
#endif
p = td->td_proc;
if (error)
panic("idle_setup: kproc_create error %d\n", error);