Changeset f619ec11 in mainline for kernel/arch/ia32/src/drivers/i8254.c
- Timestamp:
- 2007-02-03T21:26:54Z (18 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- cf5ddf6
- Parents:
- 80bcaed
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ia32/src/drivers/i8254.c
r80bcaed rf619ec11 69 69 static void i8254_irq_handler(irq_t *irq, void *arg, ...) 70 70 { 71 /* 72 * This IRQ is responsible for kernel preemption. 73 * Nevertheless, we are now holding a spinlock which prevents 74 * preemption. For this particular IRQ, we don't need the 75 * lock. We just release it, call clock() and then reacquire it again. 76 */ 77 spinlock_unlock(&irq->lock); 71 78 clock(); 79 spinlock_lock(&irq->lock); 72 80 } 73 81 … … 137 145 o2 |= inb(CLK_PORT1) << 8; 138 146 139 CPU->delay_loop_const = ((MAGIC_NUMBER*LOOPS)/1000) / ((t1-t2)-(o1-o2)) + (((MAGIC_NUMBER*LOOPS)/1000) % ((t1-t2)-(o1-o2)) ? 1 : 0); 147 CPU->delay_loop_const = 148 ((MAGIC_NUMBER * LOOPS) / 1000) / ((t1 - t2) - (o1 - o2)) + 149 (((MAGIC_NUMBER * LOOPS) / 1000) % ((t1 - t2) - (o1 - o2)) ? 1 : 0); 140 150 141 151 clk1 = get_cycle();
Note:
See TracChangeset
for help on using the changeset viewer.