Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern Assign initproc in main(), not start_init(). It's ...



details:   https://anonhg.NetBSD.org/src/rev/238243ae4518
branches:  trunk
changeset: 467571:238243ae4518
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Fri Mar 26 01:10:50 1999 +0000

description:
Assign initproc in main(), not start_init().  It's conventient to do so.

diffstat:

 sys/kern/init_main.c |  9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diffs (38 lines):

diff -r b4b98f37f124 -r 238243ae4518 sys/kern/init_main.c
--- a/sys/kern/init_main.c      Fri Mar 26 00:47:03 1999 +0000
+++ b/sys/kern/init_main.c      Fri Mar 26 01:10:50 1999 +0000
@@ -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 @@
 void
 main()
 {
-       struct proc *p, *p2;
+       struct proc *p;
        struct pdevinit *pdev;
        int i, s, error;
        extern struct pdevinit pdevinit[];
@@ -398,9 +398,9 @@
        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 @@
        /*
         * Now in process 1.
         */
-       initproc = p;
 
        /*
         * This is not the right way to do this.  We really should



Home | Main Index | Thread Index | Old Index