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

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

1991/0513/sys/src/9/gnot/trap.c:250,2551991/0614/sys/src/9/gnot/trap.c:250,256 (short | long | prev | next)
1990/03091    
long 
syscall(Ureg *aur) 
{ 
1991/0614    
	int i; 
1990/03091    
	long ret; 
	ulong sp; 
	ulong r0; 
1991/0513/sys/src/9/gnot/trap.c:292,3021991/0614/sys/src/9/gnot/trap.c:293,309
1990/1110    
			msg = "sys: odd stack"; 
1990/0511    
			goto Bad; 
		} 
1990/11211    
		if(sp<(USTKTOP-BY2PG) || sp>(USTKTOP-5*BY2WD)) 
			validaddr(sp, 5*BY2WD, 0); 
1991/0614    
		if(sp<(USTKTOP-BY2PG) || sp>(USTKTOP-(1+MAXSYSARG)*BY2WD)) 
			validaddr(sp, (1+MAXSYSARG)*BY2WD, 0); 
1990/0515    
		ret = (*systab[r0])((ulong*)(sp+BY2WD)); 
1991/0614    
		poperror(); 
1990/0511    
	} 
1990/03091    
	u->nerrlab = 0; 
1991/0614    
	if(u->nerrlab){ 
		print("unbalanced error stack: %d extra\n", u->nerrlab); 
		for(i = 0; i < NERR; i++) 
			print("sp=%lux pc=%lux\n", u->errlab[i].sp, u->errlab[i].pc); 
		panic("bad rob"); 
	} 
1990/03091    
	u->p->insyscall = 0; 
	if(r0 == NOTED)	/* ugly hack */ 
1991/0503    
		noted(aur);	/* doesn't return */ 


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