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

1992/0805/pc/fault386.c (diff list | history)

1992/0805/sys/src/9/pc/fault386.c:18,411993/0915/sys/src/9/pc/fault386.c:18,42 (short | long | prev | next)
1991/0720    
	int insyscall; 
1991/1112    
	char buf[ERRLEN]; 
1991/0718    
 
1991/0720    
	insyscall = u->p->insyscall; 
	u->p->insyscall = 1; 
1993/0915    
	insyscall = up->insyscall; 
	up->insyscall = 1; 
1991/0718    
	addr = getcr2(); 
	read = !(ur->ecode & 2); 
1991/0809    
	user = (ur->cs&0xffff) == UESEL; 
1992/0805    
	spllo(); 
1993/0915    
/* print("F%d:A#%lux:U%d:R%d|", up->pid, addr, user, read);/**/ 
1991/0719    
	n = fault(addr, read); 
	if(n < 0){ 
1991/0718    
		if(user){ 
1991/1218    
			sprint(buf, "sys: trap: fault %s addr=0x%lux", 
				read? "read" : "write", addr); 
1991/1112    
			postnote(u->p, 1, buf, NDebug); 
1993/0915    
			postnote(up, 1, buf, NDebug); 
1991/1112    
			return; 
1991/0718    
		} 
		dumpregs(ur); 
1991/0808    
		panic("fault: 0x%lux", addr); 
1991/0718    
	} 
1991/0720    
	u->p->insyscall = insyscall; 
1993/0915    
	up->insyscall = insyscall; 
1991/0710    
} 
 
void 


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