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

1991/0115/ss/mmu.c (diff list | history)

1991/0112/sys/src/9/ss/mmu.c:69,821991/0115/sys/src/9/ss/mmu.c:69,80 (short | long | prev | next)
1991/0110    
		} 
	 
1990/1226    
	sp = m->pidproc[i]; 
	if(sp){ 
1991/0115    
	if(sp) 
1990/1226    
		sp->pidonmach[m->machno] = 0; 
		purgepid(i); 
	} 
1991/0115    
	purgepid(i);	/* also does putcontext */ 
1991/0110    
	pidtime[i] = m->ticks; 
1990/1226    
	m->pidproc[i] = p; 
	m->lastpid = i; 
1990/1227    
	putcontext(i-1); 
1991/0111    
 
1990/1223    
	/* 
1991/0112    
	 * kludge: each context is allowed NKLUDGE pmegs. 
1991/0112/sys/src/9/ss/mmu.c:96,1021991/0115/sys/src/9/ss/mmu.c:94,99
1990/1226    
void 
1990/1231    
putcontext(int c) 
{ 
1991/0110    
	m->pidhere[c+1] = 1; 
1990/1231    
	putcxreg(c); 
} 
 
1991/0112/sys/src/9/ss/mmu.c:115,1231991/0115/sys/src/9/ss/mmu.c:112,117
1991/0110    
void 
purgepid(int pid) 
{ 
1990/1226    
	if(m->pidhere[pid] == 0) 
		return; 
	memset(m->pidhere, 0, sizeof m->pidhere); 
	putcontext(pid-1); 
1991/0110    
	flushcontext(); 
1990/1223    
} 
1991/0112/sys/src/9/ss/mmu.c:233,2401991/0115/sys/src/9/ss/mmu.c:227,233
1991/0112    
	/* 
	 * Prepare mmu up to this address 
	 */ 
	tp--;	/* now tp==context */ 
	tp = tp*NKLUDGE; 
1991/0115    
	tp = (tp-1)*NKLUDGE;	/* now tp==base of pmeg area for this proc */ 
1991/0112    
	l = UZERO+p->nmmuseg*BY2SEGM; 
	for(j=p->nmmuseg; j<=seg; j++){ 
		putsegm(l, kmapalloc.lowpmeg+tp+j); 
1991/0112/sys/src/9/ss/mmu.c:260,2671991/0115/sys/src/9/ss/mmu.c:253,258
1990/1227    
	 */ 
1991/0110    
	for(i=0; i<0x100; i+=16) 
		putwD16(virt+(i<<4), 0); 
1990/1231    
	if(u && u->p) 
		m->pidhere[u->p->pidonmach[m->machno]] = 1;	/* UGH! */ 
1990/1227    
	putw4(virt, phys); 
} 
 


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