From eb52c7de1dea182cc3519dc07c62b7f5fe2dfb15 Mon Sep 17 00:00:00 2001 From: rsc Date: Tue, 28 Aug 2007 19:04:36 +0000 Subject: comments; rename irq_ to pic_ --- picirq.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'picirq.c') diff --git a/picirq.c b/picirq.c index 7c5f713..1cc9953 100644 --- a/picirq.c +++ b/picirq.c @@ -1,8 +1,10 @@ +// Intel 8259A programmable interrupt controllers. + #include "types.h" #include "x86.h" #include "traps.h" -// I/O Addresses of the two 8259A programmable interrupt controllers +// I/O Addresses of the two programmable interrupt controllers #define IO_PIC1 0x20 // Master (IRQs 0-7) #define IO_PIC2 0xA0 // Slave (IRQs 8-15) @@ -10,21 +12,20 @@ // Current IRQ mask. // Initial IRQ mask has interrupt 2 enabled (for slave 8259A). -static ushort irq_mask_8259A = 0xFFFF & ~(1<> 8)); + irqmask = mask; + outb(IO_PIC1+1, mask); + outb(IO_PIC2+1, mask >> 8); } void -irq_enable(int irq) +pic_enable(int irq) { - irq_setmask_8259A(irq_mask_8259A & ~(1<