plan 9 kernel history: overview | file list | diff list

1990/0424/power/main.c (diff list | history)

1990/0412/sys/src/9/power/main.c:7,171990/0424/sys/src/9/power/main.c:7,28 (short | long | prev | next)
1990/0227    
#include	"ureg.h" 
#include	"init.h" 
 
1990/0424    
/* 
 *  args passed by boot process 
 */ 
int _argc; char **_argv; char **_env; 
 
char *argv[5]; 
char argx[4][64]; 
 
1990/0227    
void 
main(void) 
{ 
1990/0424    
	int i; 
 
1990/0227    
	active.exiting = 0; 
	active.machs = 1; 
1990/0424    
	arginit(); 
1990/0227    
	machinit(); 
	confinit(); 
	lockinit(); 
1990/0412/sys/src/9/power/main.c:33,381990/0424/sys/src/9/power/main.c:44,63
1990/0227    
} 
 
void 
1990/0424    
arginit(void) 
{ 
	int i; 
 
	if(_argc > 5) 
		_argc = 5; 
 
	for(i = 1; i < _argc; i++){ 
		strcpy(argx[i-1], _argv[i]); 
		argv[i-1] = &(argx[i-1][0]); 
	} 
} 
 
void 
1990/0227    
machinit(void) 
{ 
	int n; 
1990/0412/sys/src/9/power/main.c:142,1531990/0424/sys/src/9/power/main.c:167,180
1990/0227    
void 
init0(void) 
{ 
1990/0424    
	int i; 
 
1990/0227    
	m->proc = u->p; 
	u->p->state = Running; 
	u->p->mach = m; 
	spllo(); 
	chandevinit(); 
	                 
1990/0424    
 
1990/0227    
	u->slash = (*devtab[0].attach)(0); 
	u->dot = clone(u->slash, 0); 
 
1990/0412/sys/src/9/power/main.c:352,3621990/0424/sys/src/9/power/main.c:379,388
1990/0227    
{ 
	long x, i, j, *l; 
 
	conf.nmach = 4; 
1990/0424    
#include  "conf.h" 
 
1990/0227    
	if(conf.nmach > MAXMACH) 
		panic("confinit"); 
	conf.nproc = 193; 
	conf.npgrp = 100; 
 
	x = 0x12345678; 
1990/0322    
	for(i=4; i<128; i+=4){ 
1990/0412/sys/src/9/power/main.c:369,3901990/0424/sys/src/9/power/main.c:395,401
1990/0227    
		x += 0x3141526; 
	} 
	conf.npage = i*1024/4; 
                 
1990/0412    
	conf.npte = 4*conf.npage; 
1990/0312    
	conf.nmod = 2000; 
1990/0322    
	conf.nalarm = 10000; 
1990/0227    
	conf.norig = 500; 
	conf.nchan = 500; 
1990/0321    
	conf.nenv = 400; 
	conf.nenvchar = 20000; 
	conf.npgenv = 400; 
1990/0227    
	conf.nmtab = 100; 
	conf.nmount = 500; 
	conf.nmntdev = 30; 
	conf.nmntbuf = 60; 
	conf.nmnthdr = 60; 
	conf.nstream = 512; 
1990/0424    
	conf.npte = 4 * conf.npage; 
1990/0227    
	conf.nqueue = 5 * conf.nstream; 
	conf.nblock = 16 * conf.nstream; 
	conf.nsrv = 32; 
} 


source code copyright © 1990-2005 Lucent Technologies; see license
Plan 9 distribution
comments to russ cox (rsc@swtch.com)