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

1990/0511/gnot/trap.c (diff list | history)

1990/0511/sys/src/9/gnot/trap.c:5,101990/0513/sys/src/9/gnot/trap.c:5,11 (short | long | prev | next)
1990/03091    
#include	"fns.h" 
#include	"ureg.h" 
#include	"io.h" 
1990/0513    
#include	"errno.h" 
1990/03091    
 
void	notify(Ureg*); 
void	noted(Ureg**); 
1990/0511/sys/src/9/gnot/trap.c:241,2461990/0513/sys/src/9/gnot/trap.c:242,248
1990/03091    
	ulong sp; 
	ulong r0; 
	Ureg *ur; 
1990/0513    
	char *msg; 
1990/03091    
 
	u->p->insyscall = 1; 
	ur = aur; 
1990/0511/sys/src/9/gnot/trap.c:263,2701990/0513/sys/src/9/gnot/trap.c:265,272
1990/03091    
	u->nerrlab = 0; 
	ret = -1; 
1990/0511    
	if(!waserror()){ 
		if(r1 >= sizeof systab/BY2WD){ 
			pprint("bad sys call number %d pc %lux\n", r1, ((Ureg*)UREGADDR)->pc); 
1990/0513    
		if(r0 >= sizeof systab/BY2WD){ 
			pprint("bad sys call number %d pc %lux\n", r0, ((Ureg*)UREGADDR)->pc); 
1990/0511    
			msg = "bad sys call"; 
	    Bad: 
			postnote(u->p, 1, msg, NDebug); 
1990/0511/sys/src/9/gnot/trap.c:277,2831990/0513/sys/src/9/gnot/trap.c:279,285
1990/0511    
		} 
		if(sp<(USTKTOP-BY2PG) || sp>(USTKTOP-4*BY2WD)) 
			validaddr(ur->sp, 4*BY2WD, 0); 
		ret = (*systab[r1])((ulong*)(sp+2*BY2WD)); 
1990/0513    
		ret = (*systab[r0])((ulong*)(sp+2*BY2WD)); 
1990/0511    
	} 
1990/03091    
	u->nerrlab = 0; 
	u->p->insyscall = 0; 


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