From c647f127c1eed76376825161973edfa774a2e0d4 Mon Sep 17 00:00:00 2001 From: thorpej Date: Fri, 26 Mar 1999 01:10:50 +0000 Subject: [PATCH] Assign initproc in main(), not start_init(). It's conventient to do so. --- sys/kern/init_main.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c index a2e5bbe85075..5771ce619457 100644 --- a/sys/kern/init_main.c +++ b/sys/kern/init_main.c @@ -1,4 +1,4 @@ -/* $NetBSD: init_main.c,v 1.143 1999/03/24 05:51:22 mrg Exp $ */ +/* $NetBSD: init_main.c,v 1.144 1999/03/26 01:10:50 thorpej Exp $ */ /* * Copyright (c) 1995 Christopher G. Demetriou. All rights reserved. @@ -172,7 +172,7 @@ struct emul emul_netbsd = { void main() { - struct proc *p, *p2; + struct proc *p; struct pdevinit *pdev; int i, s, error; extern struct pdevinit pdevinit[]; @@ -398,9 +398,9 @@ main() siginit(p); /* Create process 1 (init(8)). */ - if (fork1(p, 0, NULL, &p2)) + if (fork1(p, 0, NULL, &initproc)) panic("fork init"); - cpu_set_kpc(p2, start_init, p2); + cpu_set_kpc(initproc, start_init, initproc); /* Create process 2, the pageout daemon kernel thread. */ if (kthread_create(start_pagedaemon, NULL, NULL, "pagedaemon")) @@ -468,7 +468,6 @@ start_init(arg) /* * Now in process 1. */ - initproc = p; /* * This is not the right way to do this. We really should