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

1991/0709/port/sysproc.c (diff list | history)

1991/0707/sys/src/9/port/sysproc.c:28,361991/0709/sys/src/9/port/sysproc.c:28,34 (short | long | prev | next)
1990/0614    
	KMap *k; 
1990/0227    
	int n, on, i; 
	int lastvar;	/* used to compute stack address */ 
	/* 
	 * Kernel stack 
	 */ 
1991/0709    
 
1990/0227    
	p = newproc(); 
1991/0705    
 
	/* Page va of upage used as check in mapstack */ 
1991/0707/sys/src/9/port/sysproc.c:204,2101991/0709/sys/src/9/port/sysproc.c:202,208
1990/0227    
	 * Build the stack segment, putting it in kernel virtual for the moment 
	 */ 
1991/0523    
	if(spage > TSTKSIZ) 
1991/0522    
		errors("not enough argument stack space"); 
1991/0709    
		errors("too many arguments"); 
1991/0522    
 
1991/0705    
	  
	p->seg[ESEG] = newseg(SG_STACK, TSTKTOP-USTKSIZE, USTKSIZE/BY2PG); 
1991/0707/sys/src/9/port/sysproc.c:238,2511991/0709/sys/src/9/port/sysproc.c:236,245
1990/0227    
	/* 
1991/0705    
	 * Committed.  Free old memory. Special segments are maintained accross exec 
1990/0227    
	 */ 
1991/0705    
	putseg(p->seg[TSEG]); 
	p->seg[TSEG] = 0;	/* prevent a second free if we have an error */ 
	putseg(p->seg[DSEG]); 
	p->seg[DSEG] = 0; 
	putseg(p->seg[BSEG]); 
	p->seg[BSEG] = 0; 
	putseg(p->seg[SSEG]); 
	p->seg[SSEG] = 0; 
1991/0709    
	for(i = SSEG; i <= BSEG; i++) { 
		putseg(p->seg[i]); 
		p->seg[i] = 0;	    /* prevent a second free if we have an error */ 
	} 
1990/08141    
 
	/* 
	 * Close on exec 


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