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

Function cpu_lock_delay

freebsd/x86/x86/delay.c:126–143  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

124}
125
126void
127cpu_lock_delay(void)
128{
129
130 /*
131 * Use TSC to wait for a usec if present, otherwise fall back
132 * to reading from port 0x84. We can't call into timecounters
133 * for this delay since timecounters might use spin locks.
134 *
135 * Note that unlike delay_tc(), this uses the TSC even if it
136 * is not P-state invariant. For this function it is ok to
137 * wait even a few usecs.
138 */
139 if (tsc_freq != 0)
140 delay_tsc(1);
141 else
142 inb(0x84);
143}

Callers 1

Calls 2

delay_tscFunction · 0.85
inbFunction · 0.50

Tested by

no test coverage detected