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

alphapc/i8259.c (diff list | history)

1999/0415/sys/src/9/alphapc/i8259.c:35,402000/0401/sys/src/9/alphapc/i8259.c:35,42 (short | long)
1999/0415    
{ 
	int /*elcr1, */ x; 
 
2000/0401    
	ioalloc(Int0ctl, 2, 0, "i8259.0"); 
	ioalloc(Int1ctl, 2, 0, "i8259.1"); 
1999/0415    
	int0mask = 0xFF; 
	int1mask = 0xFF; 
 
1999/0415/sys/src/9/alphapc/i8259.c:121,1332000/0401/sys/src/9/alphapc/i8259.c:123,134
1999/0415    
} 
 
int 
i8259enable(int v, int, Irqctl* irqctl) 
2000/0401    
i8259enable(int v, int, Vctl* vctl) 
1999/0415    
{ 
	if(v < VectorPIC || v > MaxVectorPIC){ 
		iprint("i8259enable: vector %d out of range\n", v); 
2000/0401    
	if(v > MaxIrqPIC){ 
		print("i8259enable: vector %d out of range\n", v); 
1999/0415    
		return -1; 
	} 
	v -= VectorPIC; 
 
	/* 
	 *  enable corresponding interrupt in 8259 
1999/0415/sys/src/9/alphapc/i8259.c:142,1512000/0401/sys/src/9/alphapc/i8259.c:143,152
1999/0415    
	} 
 
	if(elcr & (1<<v)) 
		irqctl->eoi = i8259isr; 
2000/0401    
		vctl->eoi = i8259isr; 
1999/0415    
	else 
		irqctl->isr = i8259isr; 
	irqctl->isintr = 1; 
2000/0401    
		vctl->isr = i8259isr; 
	vctl->isintr = 1; 
1999/0415    
 
	return v; 
} 


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