MCPcopy Create free account
hub / github.com/F-Stack/f-stack / getit

Function getit

freebsd/x86/isa/clock.c:204–219  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

202}
203
204static int
205getit(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.

Callers 2

i8254_delayFunction · 0.85
i8254_get_timecountFunction · 0.85

Calls 2

outbFunction · 0.50
inbFunction · 0.50

Tested by

no test coverage detected