Subversion Repositories HelenOS-historic

Rev

Rev 15 | Rev 195 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 15 Rev 125
Line 107... Line 107...
107
 
107
 
108
    outb(CLK_PORT4, 0xd2);
108
    outb(CLK_PORT4, 0xd2);
109
    o2 = inb(CLK_PORT1);
109
    o2 = inb(CLK_PORT1);
110
    o2 |= inb(CLK_PORT1) << 8;
110
    o2 |= inb(CLK_PORT1) << 8;
111
 
111
 
112
 
-
 
113
    CPU->delay_loop_const = ((MAGIC_NUMBER*LOOPS)/1000) / ((t1-t2)-(o1-o2)) +
112
    CPU->delay_loop_const = ((MAGIC_NUMBER*LOOPS)/1000) / ((t1-t2)-(o1-o2)) + (((MAGIC_NUMBER*LOOPS)/1000) % ((t1-t2)-(o1-o2)) ? 1 : 0);
114
                    (((MAGIC_NUMBER*LOOPS)/1000) % ((t1-t2)-(o1-o2)) ? 1 : 0);
-
 
115
   
-
 
116
 
113
 
117
    clk1 = rdtsc();
114
    clk1 = rdtsc();
118
    delay(1<<SHIFT);
115
    delay(1<<SHIFT);
119
    clk2 = rdtsc();
116
    clk2 = rdtsc();
120
   
117