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

1991/0827/gnot/mmu.c (diff list | history)

1991/0821/sys/src/9/gnot/mmu.c:143,1491991/0827/sys/src/9/gnot/mmu.c:143,151 (short | long | prev | next)
1990/06021    
kmap(Page *pg) 
{ 
	KMap *k; 
1991/0827    
	int s; 
1990/06021    
 
1991/0827    
	s = splhi(); 
1990/06021    
	lock(&kmapalloc); 
	k = kmapalloc.free; 
1990/0709    
	if(k == 0){ 
1991/0821/sys/src/9/gnot/mmu.c:152,1571991/0827/sys/src/9/gnot/mmu.c:154,160
1990/0709    
	} 
1990/06021    
	kmapalloc.free = k->next; 
	unlock(&kmapalloc); 
1991/0827    
	splx(s); 
1991/0821    
 
1990/06021    
	k->pa = pg->pa; 
	putkmmu(k->va, PPN(k->pa) | PTEVALID | PTEKERNEL); 
1991/0821/sys/src/9/gnot/mmu.c:161,1731991/0827/sys/src/9/gnot/mmu.c:164,180
1990/06021    
void 
kunmap(KMap *k) 
{ 
1991/0827    
	int s; 
 
1990/06021    
	k->pa = 0; 
1991/0821    
	putkmmu(k->va, INVALIDPTE); 
 
1991/0827    
	s = splhi(); 
1990/06021    
	lock(&kmapalloc); 
	k->next = kmapalloc.free; 
	kmapalloc.free = k; 
	unlock(&kmapalloc); 
1991/0827    
	splx(s); 
1990/1211    
} 
 
void 


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