From 83e9ad568022acfed4265fd5bb432815773900b5 Mon Sep 17 00:00:00 2001 From: julian Date: Sat, 27 Oct 2007 00:42:40 +0000 Subject: 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 --- sys/kern/kern_idle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys') diff --git a/sys/kern/kern_idle.c b/sys/kern/kern_idle.c index b68292d..62a901f 100644 --- a/sys/kern/kern_idle.c +++ b/sys/kern/kern_idle.c @@ -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); -- cgit v1.1