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

1991/1005/pc/mmu.c (diff list | history)

1991/1004/sys/src/9/pc/mmu.c:297,3021991/1005/sys/src/9/pc/mmu.c:297,303 (short | long | prev | next)
1991/0718    
	ulong *pt; 
	Proc *p; 
1991/1004    
	char err[64]; 
1991/1005    
	int x; 
1991/0718    
 
	if(u==0) 
		panic("putmmu"); 
1991/1004/sys/src/9/pc/mmu.c:313,3201991/1005/sys/src/9/pc/mmu.c:314,329
1991/1004    
	 *  into it. 
1991/0718    
	 */ 
1991/1004    
	if(p->mmutop == 0){ 
		p->mmutop = mmugetpage(0); 
		memmove((void*)p->mmutop->va, (void*)ktoppg.va, BY2PG); 
1991/1005    
		/* 
		 *  N.B. The assignment to pg is neccessary. 
		 *  We can't assign to p->mmutop until after 
		 *  copying ktoppg into the new page since we might 
		 *  get scheded in this code and p->mmutop will be 
		 *  pointing to a bad map. 
		 */ 
		pg = mmugetpage(0); 
		memmove((void*)pg->va, (void*)ktoppg.va, BY2PG); 
		p->mmutop = pg; 
1991/1004    
	} 
	top = (ulong*)p->mmutop->va; 
1991/0718    
 


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