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

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

1991/0705/sys/src/9/port/sysproc.c:129,1341991/0706/sys/src/9/port/sysproc.c:129,135 (short | long | prev | next)
1990/0227    
	} 
	if(!indir) 
		strcpy(elem, u->elem); 
1991/0706    
 
1991/0411    
	n = (*devtab[tc->type].read)(tc, &exec, sizeof(Exec), 0); 
1990/0227    
	if(n < 2) 
    Err: 
1991/0705/sys/src/9/port/sysproc.c:257,2621991/0706/sys/src/9/port/sysproc.c:258,264
1991/0705    
	img = attachimage(SG_TEXT|SG_RONLY, tc, UTZERO, (t-UTZERO)>>PGSHIFT); 
	ts = img->s; 
	p->seg[TSEG] = ts; 
1991/0706    
	ts->flushme = 1; 
1991/0705    
	ts->fstart = 0; 
	ts->flen = sizeof(Exec)+exec.text; 
1990/0227    
 
1991/0705/sys/src/9/port/sysproc.c:270,2811991/0706/sys/src/9/port/sysproc.c:272,280
1991/0705    
	s->fstart = ts->fstart+ts->flen; 
	s->flen = exec.data; 
1990/0227    
 
                 
1991/0705    
	/* BSS. Zero fill on demand */ 
	p->seg[BSEG] = newseg(SG_BSS, d, (b-d)>>PGSHIFT); 
1990/1211    
 
1991/0705    
	close(tc); 
                 
1990/0227    
	/* 
	 * Move the stack 
	 */ 
1991/0705/sys/src/9/port/sysproc.c:286,2911991/0706/sys/src/9/port/sysproc.c:285,291
1991/0705    
	relocateseg(s, TSTKTOP-USTKTOP); 
	p->seg[ESEG] = 0; 
1990/0227    
 
1991/0706    
	close(tc); 
1991/0705    
	poperror(); 
 
1991/0529    
	/* 
1991/0705/sys/src/9/port/sysproc.c:525,5361991/0706/sys/src/9/port/sysproc.c:525,536
1991/0705    
	Segment *s; 
	ulong from, len; 
 
	s = seg(u->p, arg[0], 1); 
1991/0706    
	from = PGROUND(arg[0]); 
	s = seg(u->p, from, 1); 
1991/0705    
	if(s == 0) 
		errors("not in address space"); 
 
	from = PGROUND(arg[1]); 
	len = arg[2]; 
1991/0706    
	len = arg[1]; 
1991/0705    
 
	if(from+len > s->top) { 
		qunlock(&s->lk); 


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