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

1991/1125/port/segment.c (diff list | history)

1991/1122/sys/src/9/port/segment.c:339,3551991/1125/sys/src/9/port/segment.c:339,355 (short | long | prev | next)
1991/0705    
	if(s == 0) 
		errors("no segment"); 
 
	qlock(&s->lk); 
                 
	if(addr == 0) 
		return s->base; 
 
1991/1125    
	qlock(&s->lk); 
 
1991/0705    
	if(addr < s->base) { 
		/* We may start with the bss overlapping the data */ 
		if(seg != BSEG || u->p->seg[DSEG] == 0 || addr < u->p->seg[DSEG]->base) { 
			qunlock(&s->lk); 
			pprint("addr below segment\n"); 
 		} 
1991/1125    
			errors("addr below segment"); 
		} 
1991/0705    
		addr = s->base; 
	} 
		 


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