Rev 2218 | Rev 3902 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 2218 | Rev 2439 | ||
|---|---|---|---|
| Line 64... | Line 64... | ||
| 64 | static irq_ownership_t i8254_claim(void) |
64 | static irq_ownership_t i8254_claim(void) |
| 65 | { |
65 | { |
| 66 | return IRQ_ACCEPT; |
66 | return IRQ_ACCEPT; |
| 67 | } |
67 | } |
| 68 | 68 | ||
| 69 | static void i8254_irq_handler(irq_t *irq, void *arg, ...) |
69 | static void i8254_irq_handler(irq_t *irq, void *arg __attribute__((unused)), ...) |
| 70 | { |
70 | { |
| 71 | /* |
71 | /* |
| 72 | * This IRQ is responsible for kernel preemption. |
72 | * This IRQ is responsible for kernel preemption. |
| 73 | * Nevertheless, we are now holding a spinlock which prevents |
73 | * Nevertheless, we are now holding a spinlock which prevents |
| 74 | * preemption. For this particular IRQ, we don't need the |
74 | * preemption. For this particular IRQ, we don't need the |
| Line 119... | Line 119... | ||
| 119 | outb(CLK_PORT1, 0xff); |
119 | outb(CLK_PORT1, 0xff); |
| 120 | 120 | ||
| 121 | do { |
121 | do { |
| 122 | /* will read both status and count */ |
122 | /* will read both status and count */ |
| 123 | outb(CLK_PORT4, 0xc2); |
123 | outb(CLK_PORT4, 0xc2); |
| 124 | not_ok = (inb(CLK_PORT1)>>6)&1; |
124 | not_ok = (uint8_t) ((inb(CLK_PORT1) >> 6) & 1); |
| 125 | t1 = inb(CLK_PORT1); |
125 | t1 = inb(CLK_PORT1); |
| 126 | t1 |= inb(CLK_PORT1) << 8; |
126 | t1 |= inb(CLK_PORT1) << 8; |
| 127 | } while (not_ok); |
127 | } while (not_ok); |
| 128 | 128 | ||
| 129 | asm_delay_loop(LOOPS); |
129 | asm_delay_loop(LOOPS); |