Subversion Repositories HelenOS

Compare Revisions

Regard whitespace Rev 2017 → Rev 2018

/trunk/kernel/arch/ia32/src/drivers/i8254.c
39,6 → 39,7
#include <arch/types.h>
#include <time/clock.h>
#include <time/delay.h>
#include <arch/cycle.h>
#include <arch/interrupt.h>
#include <arch/drivers/i8259.h>
#include <arch/drivers/i8254.h>
137,9 → 138,9
 
CPU->delay_loop_const = ((MAGIC_NUMBER*LOOPS)/1000) / ((t1-t2)-(o1-o2)) + (((MAGIC_NUMBER*LOOPS)/1000) % ((t1-t2)-(o1-o2)) ? 1 : 0);
 
clk1 = rdtsc();
clk1 = get_cycle();
delay(1<<SHIFT);
clk2 = rdtsc();
clk2 = get_cycle();
CPU->frequency_mhz = (clk2-clk1)>>SHIFT;