conversion of ino_t from u_short to u_long (making dir entries 32 bytes each)
[unix-history] / usr / src / sys / kern / init_main.c
index cef1da5..0d3f4ec 100644 (file)
@@ -1,4 +1,4 @@
-/*     init_main.c     4.13    81/04/13        */
+/*     init_main.c     4.22    81/11/18        */
 
 #include "../h/param.h"
 #include "../h/systm.h"
 
 #include "../h/param.h"
 #include "../h/systm.h"
@@ -20,6 +20,9 @@
 #include "../h/text.h"
 #include "../h/vlimit.h"
 #include "../h/clist.h"
 #include "../h/text.h"
 #include "../h/vlimit.h"
 #include "../h/clist.h"
+#ifdef INET
+#include "../h/protosw.h"
+#endif
 
 /*
  * Initialization code.
 
 /*
  * Initialization code.
@@ -45,8 +48,6 @@ main(firstaddr)
 
        rqinit();
        startup(firstaddr);
 
        rqinit();
        startup(firstaddr);
-       if (lotsfree == 0)
-               lotsfree = LOTSFREE;
 
        /*
         * set up system process 0 (swapper)
 
        /*
         * set up system process 0 (swapper)
@@ -78,10 +79,12 @@ main(firstaddr)
        clkstart();
 
        /*
        clkstart();
 
        /*
-        * Initialize devices and
-        * set up 'known' i-nodes
+        * Initialize tables, protocols, and set up well-known inodes.
         */
         */
-
+       mbinit();
+#ifdef INET
+       pfinit();
+#endif
        ihinit();
        bhinit();
        cinit();
        ihinit();
        bhinit();
        cinit();
@@ -96,13 +99,17 @@ main(firstaddr)
        u.u_dmap = zdmap;
        u.u_smap = zdmap;
 
        u.u_dmap = zdmap;
        u.u_smap = zdmap;
 
+       /*
+        * Set the scan rate and other parameters of the paging subsystem.
+        */
+       setupclock();
+
        /*
         * make page-out daemon (process 2)
         * the daemon has ctopt(nswbuf*CLSIZE*KLMAX) pages of page
         * table so that it can map dirty pages into
         * its address space during asychronous pushes.
         */
        /*
         * make page-out daemon (process 2)
         * the daemon has ctopt(nswbuf*CLSIZE*KLMAX) pages of page
         * table so that it can map dirty pages into
         * its address space during asychronous pushes.
         */
-
        mpid = 1;
        proc[0].p_szpt = clrnd(ctopt(nswbuf*CLSIZE*KLMAX + UPAGES));
        proc[1].p_stat = SZOMB;         /* force it to be in proc slot 2 */
        mpid = 1;
        proc[0].p_szpt = clrnd(ctopt(nswbuf*CLSIZE*KLMAX + UPAGES));
        proc[1].p_stat = SZOMB;         /* force it to be in proc slot 2 */
@@ -130,6 +137,13 @@ main(firstaddr)
                 */
                return;
        }
                 */
                return;
        }
+
+#ifdef BBNNET 
+       /*
+        * Initialize bbn network.
+        */
+       netmain();
+#endif BBNNET
        proc[0].p_szpt = 1;
        sched();
 }
        proc[0].p_szpt = 1;
        sched();
 }
@@ -211,6 +225,8 @@ binit()
                nswdev++;
        if (nswdev == 0)
                panic("binit");
                nswdev++;
        if (nswdev == 0)
                panic("binit");
+       if (nswdev > 1)
+               nswap = (nswap/DMMAX)*DMMAX;
        nswap *= nswdev;
        maxpgio *= nswdev;
        swfree(0);
        nswap *= nswdev;
        maxpgio *= nswdev;
        swfree(0);