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

1991/0814/gnot/trap.c (diff list | history)

1991/0731/sys/src/9/gnot/trap.c:199,2191991/0814/sys/src/9/gnot/trap.c:199,227 (short | long | prev | next)
1991/0503    
	Ureg *nur; 
 
	nur = u->ureg; 
	validaddr(nur->pc, 1, 0); 
	validaddr(nur->usp, BY2WD, 0); 
	if(nur->sr!=u->svsr || nur->vo!=u->svvo){ 
		pprint("bad noted ureg sr %ux vo %ux\n", nur->sr, nur->vo); 
1991/0814    
    Die: 
1991/0503    
		pexit("Suicide", 0); 
	} 
1990/03091    
	lock(&u->p->debug); 
1990/0619    
	if(!u->notified){ 
		unlock(&u->p->debug); 
		return; 
1991/0814    
		pprint("call to noted() when not notified\n"); 
		goto Die; 
1990/0619    
	} 
1990/03091    
	u->notified = 0; 
1991/0503    
	memmove(ur, u->ureg, sizeof(Ureg)); 
1991/0717    
	switch(arg0){ 
	case NCONT: 
1991/0814    
		if(waserror()){ 
			pprint("suicide: trap in noted\n"); 
			unlock(&u->p->debug); 
			goto Die; 
		} 
		validaddr(nur->pc, 1, 0); 
		validaddr(nur->usp, BY2WD, 0); 
		poperror(); 
1991/0717    
		splhi(); 
		unlock(&u->p->debug); 
		rfnote(ur); 


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