Changeset 134877d in mainline for kernel/arch/ia32/src/drivers/i8254.c
- Timestamp:
- 2006-12-11T17:40:10Z (18 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 319e60e
- Parents:
- 8cd140f2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ia32/src/drivers/i8254.c
r8cd140f2 r134877d 40 40 #include <time/clock.h> 41 41 #include <time/delay.h> 42 #include <arch/cycle.h> 42 43 #include <arch/interrupt.h> 43 44 #include <arch/drivers/i8259.h> … … 138 139 CPU->delay_loop_const = ((MAGIC_NUMBER*LOOPS)/1000) / ((t1-t2)-(o1-o2)) + (((MAGIC_NUMBER*LOOPS)/1000) % ((t1-t2)-(o1-o2)) ? 1 : 0); 139 140 140 clk1 = rdtsc();141 delay(1 <<SHIFT);142 clk2 = rdtsc();141 clk1 = get_cycle(); 142 delay(1 << SHIFT); 143 clk2 = get_cycle(); 143 144 144 CPU->frequency_mhz = (clk2 -clk1)>>SHIFT;145 CPU->frequency_mhz = (clk2 - clk1) >> SHIFT; 145 146 146 147 return;
Note:
See TracChangeset
for help on using the changeset viewer.