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

Function cpu_idle

freebsd/mips/mips/machdep.c:542–559  ·  view source on GitHub ↗

* call platform specific code to halt (until next interrupt) for the idle loop */

Source from the content-addressed store, hash-verified

540 * call platform specific code to halt (until next interrupt) for the idle loop
541 */
542void
543cpu_idle(int busy)
544{
545 KASSERT((mips_rd_status() & MIPS_SR_INT_IE) != 0,
546 ("interrupts disabled in idle process."));
547 KASSERT((mips_rd_status() & MIPS_INT_MASK) != 0,
548 ("all interrupts masked in idle process."));
549
550 if (!busy) {
551 critical_enter();
552 cpu_idleclock();
553 }
554 mips_wait();
555 if (!busy) {
556 cpu_activeclock();
557 critical_exit();
558 }
559}
560
561int
562cpu_idle_wakeup(int cpu)

Callers

nothing calls this directly

Calls 4

cpu_idleclockFunction · 0.85
cpu_activeclockFunction · 0.85
critical_enterFunction · 0.50
critical_exitFunction · 0.50

Tested by

no test coverage detected