Rev 2633 | Rev 3228 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2633 | Rev 2634 | ||
---|---|---|---|
Line 108... | Line 108... | ||
108 | 108 | ||
109 | static void timer_irq_handler(irq_t *irq, void *arg, ...) |
109 | static void timer_irq_handler(irq_t *irq, void *arg, ...) |
110 | { |
110 | { |
111 | unsigned long drift; |
111 | unsigned long drift; |
112 | 112 | ||
113 | if (cp0_count_read() < lastcount) { |
113 | if (cp0_count_read() < lastcount) |
114 | /* Count overflow detection */ |
114 | /* Count overflow detected */ |
115 | count_hi++; |
115 | count_hi++; |
116 | lastcount = cp0_count_read(); |
116 | lastcount = cp0_count_read(); |
117 | } |
- | |
118 | 117 | ||
119 | drift = cp0_count_read() - nextcount; |
118 | drift = cp0_count_read() - nextcount; |
120 | while (drift > cp0_compare_value) { |
119 | while (drift > cp0_compare_value) { |
121 | drift -= cp0_compare_value; |
120 | drift -= cp0_compare_value; |
122 | CPU->missed_clock_ticks++; |
121 | CPU->missed_clock_ticks++; |