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

1998/0512/port/segment.c (diff list | history)

1998/0326/sys/src/9/port/segment.c:180,1861998/0512/sys/src/9/port/segment.c:180,186 (short | long | prev | next)
Whitespace edit.
rsc Fri Mar 4 12:44:25 2005
1991/0705    
 
1992/0824    
	n->flushme = s->flushme; 
	qunlock(&s->lk); 
	return n;	 
1998/0512    
	return n; 
1991/0705    
} 
 
void 
1998/0326/sys/src/9/port/segment.c:218,2251998/0512/sys/src/9/port/segment.c:218,225
1991/0705    
	lock(&imagealloc); 
 
1991/0724    
	/* 
	 * Search the image cache for remains of the text from a previous  
	 * or currently running incarnation  
1998/0512    
	 * Search the image cache for remains of the text from a previous 
	 * or currently running incarnation 
1991/0724    
	 */ 
1991/0705    
	for(i = ihash(c->qid.path); i; i = i->hash) { 
		if(c->qid.path == i->qid.path) { 
1998/0326/sys/src/9/port/segment.c:234,2401998/0512/sys/src/9/port/segment.c:234,240
1991/0705    
			unlock(i); 
		} 
	} 
	                 
1998/0512    
 
1991/0724    
	/* 
	 * imagereclaim dumps pages from the free list which are cached by image 
	 * structures. This should free some image structures. 
1998/0326/sys/src/9/port/segment.c:335,3441998/0512/sys/src/9/port/segment.c:335,344
1991/0705    
	lock(i); 
	if(--i->ref == 0) { 
		l = &ihash(i->qid.path); 
		i->qid = (Qid){~0, ~0};	 
1998/0512    
		i->qid = (Qid){~0, ~0}; 
1991/0705    
		unlock(i); 
		c = i->c; 
	                 
1998/0512    
 
1991/0705    
		lock(&imagealloc); 
		for(f = *l; f; f = f->hash) { 
			if(f == i) { 
1998/0326/sys/src/9/port/segment.c:393,3991998/0512/sys/src/9/port/segment.c:393,399
1991/1125    
		} 
1991/0705    
		addr = s->base; 
	} 
		                 
1998/0512    
 
1991/0705    
	newtop = PGROUND(addr); 
	newsize = (newtop-s->base)/BY2PG; 
	if(newtop < s->top) { 
1998/0326/sys/src/9/port/segment.c:435,4411998/0512/sys/src/9/port/segment.c:435,441
1991/0705    
	j = (soff&(PTEMAPMEM-1))/BY2PG; 
 
	for(i = soff/PTEMAPMEM; i < SEGMAPSIZE; i++) { 
		if(pages <= 0)  
1998/0512    
		if(pages <= 0) 
1992/1206    
			break; 
		if(s->map[i] == 0) { 
			pages -= PTEPERTAB-j; 
1998/0326/sys/src/9/port/segment.c:446,4521998/0512/sys/src/9/port/segment.c:446,452
1992/1206    
			pg = s->map[i]->pages[j]; 
			if(pg) { 
				putpage(pg); 
				s->map[i]->pages[j] = 0;	 
1998/0512    
				s->map[i]->pages[j] = 0; 
1991/0705    
			} 
1992/1206    
			if(--pages == 0) 
				return; 
1998/0326/sys/src/9/port/segment.c:467,4731998/0512/sys/src/9/port/segment.c:467,473
1994/0514    
	for(i = 0; i < NSEG; i++) { 
		ns = p->seg[i]; 
		if(ns == 0) 
			continue;	 
1998/0512    
			continue; 
1994/0514    
		if((newtop > ns->base && newtop <= ns->top) || 
		   (va >= ns->base && va < ns->top)) 
			return 1; 


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