| 202 | } |
| 203 | |
| 204 | static int |
| 205 | getit(void) |
| 206 | { |
| 207 | int high, low; |
| 208 | |
| 209 | mtx_lock_spin(&clock_lock); |
| 210 | |
| 211 | /* Select timer0 and latch counter value. */ |
| 212 | outb(TIMER_MODE, TIMER_SEL0 | TIMER_LATCH); |
| 213 | |
| 214 | low = inb(TIMER_CNTR0); |
| 215 | high = inb(TIMER_CNTR0); |
| 216 | |
| 217 | mtx_unlock_spin(&clock_lock); |
| 218 | return ((high << 8) | low); |
| 219 | } |
| 220 | |
| 221 | /* |
| 222 | * Wait "n" microseconds. |
no test coverage detected