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

1998/0516/pc/trap.c (diff list | history)

1998/0514/sys/src/9/pc/trap.c:140,1561998/0516/sys/src/9/pc/trap.c:140,145 (short | long | prev | next)
Bug fix: don't preempt process if it's already been preempted on this stack.
Remove debugging stack overflow check.
rsc Fri Mar 4 12:44:25 2005
1997/0327    
		up->dbgreg = ureg; 
1997/1101    
	} 
1991/1112    
 
1998/0512    
{ 
ulong x, y; 
                 
1998/0514    
if(up) 
  x = (ulong)(up->kstack); 
else 
  x = (ulong)(m->stack); 
1998/0512    
y = (ulong)&mach; 
1998/0514    
if(y < x+512) panic("cpu%d: trap: kstack %lux %lux", m->machno, x, y); 
1998/0512    
} 
                 
1997/0327    
	v = ureg->trap; 
	if(ctl = irqctl[v]){ 
1997/1101    
		if(ctl->isintr){ 
1998/0514/sys/src/9/pc/trap.c:167,1781998/0516/sys/src/9/pc/trap.c:156,177
1997/0327    
		if(ctl->eoi) 
			ctl->eoi(v); 
1998/0401    
 
		/* preemptive scheduling */ 
1998/0516    
		/*  
		 *  preemptive scheduling.  to limit stack depth, 
		 *  make sure process has a chance to return from 
		 *  the current interrupt before being preempted a 
		 *  second time. 
		 */ 
1998/0401    
		if(ctl->isintr && v != VectorTIMER && v != VectorCLOCK) 
1998/0512    
		if(up && up->state == Running) 
		if(anyhigher()) 
		if(!active.exiting) 
1998/0516    
		if(up->preempted == 0) 
		if(!active.exiting){ 
			up->preempted = 1; 
1998/0512    
			sched(); 
1998/0516    
			splhi(); 
			up->preempted = 0; 
		} 
1991/0731    
	} 
1997/0327    
	else if(v <= 16 && user){ 
		spllo(); 


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